On Tuesday 09 October 2007, John Zaitseff wrote:
> Dear Nicolas / LilyPonders,
>
> I store a field in the header, lastupdated, in the form "09-Oct-2007";
> the \parsed-date function converts that to something like "9 October,
> 2007":
>
>   % \parsed-date DATE - convert a DD-MMM-YYYY property to a fully printed
> date #(define-markup-command (parsed-date layout props date) (symbol?)
> "Convert the property @var{date} containing a date in the
>   form DD-MMM-YYYY into a nicely formatted stencil output D MMMM,
>   YYYY."
>       (let* ((datestr (chain-assoc-get date props)))
>           (interpret-markup layout props
>               (if (string? datestr)
>                   (markup #:simple
>                       (strftime "%e %B, %Y" (car (strptime "%d-%b-%Y"
> datestr)))) datestr))))
>
> (Of course, I should rewrite that to make it somewhat more robust.
> It works for me, however).

You may want to use SRFI-19 for this,
http://www.gnu.org/software/guile/manual/html_node/SRFI_002d19.html#SRFI_002d19

Erik


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to