Sexp diary entries are especially powerful when the fancy diary display is used because the function called can generate the text of the entry depending on the date itself. For example, the anniversary diary entry described above (see section Special Diary Entries (Sexps)) can insert the number of years since the anniversary date into the text of the diary entry. Thus the dairy entry
%%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old)
will have the `%d' replaced by the age, so on October 31, 1990 the entry will appear in the fancy diary buffer as
Arthur's birthday (42 years old)
If the diary file instead contains the entry
%%(diary-anniversary 10 31 1948) Arthur's %d%s birthday
the entry in the fancy diary buffer for October 31, 1990 will be
Arthur's 42nd birthday
Similarly, cyclic diary entries can interpolate the number of repetitions that have occurred:
%%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time)
will cause the diary entry
Renew medication (5th time)
to appear in the fancy diary display on September 8, 1990.
The following sexp diary entries take advantage of the ability (in the fancy diary display) to concoct diary entries based on the date:
%%(diary-day-of-year)
%%(diary-iso-date)
%%(diary-hebrew-date)
%%(diary-islamic-date)
%%(diary-french-date)
Thus including the diary entry
&%%(diary-hebrew-date)
will cause every day's diary display to contain the equivalent date on the Hebrew calendar, if you are using the fancy diary display. (If you are not using the fancy diary display, you will simply see the line `&%%(diary-hebrew-date)' when your diary file is displayed with any day's diary entries.)
There are a number of other available sexp diary entries that are important to those who follow the Hebrew calendar:
%%(diary-rosh-hodesh)
%%(diary-parasha)
%%(diary-omer)
%%(diary-yahrzeit MONTH DAY YEAR) NAME
DAY
, MONTH
, YEAR
.)