]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/adding-the-current-date-to-a-score.ly
Release: bump Welcome versions.
[lilypond.git] / Documentation / snippets / adding-the-current-date-to-a-score.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.18.0"
8
9 \header {
10   lsrtags = "really-cool, scheme-language, text, titles"
11
12   texidoc = "
13 With a little Scheme code, the current date can easily be added to a
14 score.
15
16 "
17   doctitle = "Adding the current date to a score"
18 } % begin verbatim
19
20 % first, define a variable to hold the formatted date:
21 date = #(strftime "%d-%m-%Y" (localtime (current-time)))
22
23 % use it in the title block:
24 \header {
25   title = "Including the date!"
26   subtitle = \date
27 }
28
29 \score {
30   \relative c'' {
31     c4 c c c
32   }
33 }
34 % and use it in a \markup block:
35 \markup {
36   \date
37 }