X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=input%2Flsr%2Fadding-the-current-date-to-a-score.ly;h=a4748c36a73f2a88f1c1e47c60ef9bccc1e68572;hb=def21b306e2b8fa2d5630fab0878e9922e197f0c;hp=b3ee589826c31cdbc6f4a95b143de3d27f4c2a8e;hpb=41933f2bb53d0fe28422212e1673fef536b1cead;p=lilypond.git diff --git a/input/lsr/adding-the-current-date-to-a-score.ly b/input/lsr/adding-the-current-date-to-a-score.ly index b3ee589826..a4748c36a7 100644 --- a/input/lsr/adding-the-current-date-to-a-score.ly +++ b/input/lsr/adding-the-current-date-to-a-score.ly @@ -1,33 +1,24 @@ %% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it %% This file is in the public domain. -\version "2.11.46" +\version "2.11.57" \header { lsrtags = "titles" - texidoc = " -I often find it useful to include a date on printed music, so that I -can see if I'm using the latest version, or tell someone else that he -should only use the version after a certain date. A simple solution is -to enter the date manually to the @code{.ly} file. But that's very -error prone. It's easy to forget updating the date. So i thought it -would be useful if you can add the date on which the PDF file is -generated automatically. I did't figure it out myself, but I asked on -lilypond-user mailing list. And guess what? Someone came with an -excellent solution! So thank you very much Toine Schreurs for sending -this solution to the user mailing list. I post it here for future -reference. + texidoces = " +Con algo de código de Scheme, se puede añadir fácilmente la fecha +actual a una partitura. + +" + doctitlees = "Añadir la fecha actual a una partitura" -The solution is to use two scheme functions called @code{strftime} and -@code{localtime}, as shown in the snippet. It is a very flexible -solution, you can format the date just as you like it by adapting the -@code{\"%d-%m-%Y\"} string. See the Guile documentation for more -details on this format string: Formatting Calendar Time. + texidoc = " +With a little Scheme code, the current date can easily be added to a +score. " doctitle = "Adding the current date to a score" } % begin verbatim -\version "2.11.46" % first, define a variable to hold the formatted date: date = #(strftime "%d-%m-%Y" (localtime (current-time)))