Pablo Rodriguez via ntg-context schrieb am 16.12.2024 um 19:05:
Dear list,
I would like to be able to design some calendars.
Is there any way to have a command (Lua or ConTeXt) that can increase or decrease a given date by days (something like \nextday or \previousday).
I have tried \date and \increment or \decrement, as shown in the wiki:
\starttext Today is \currentdate.
\dorecurse{25} {\increment\normalday}
Tomorrow will be \currentdate.
\decrement\normalday
%\increment\normalmonth% -- gives an error \increment\normalyear
And today in a year will be \currentdate. \stoptext
But the main problem is that I end up having the improbable day of December 41st, 2024 (with \decrement\normalday, it would read -9th).
Besides, \normalmonth cannot be incremented or decremented (although this would be useless for me).
Is there any way to get a command that can increment or decrement by days a given date?
https://www.mail-archive.com/ntg-context@ntg.nl/msg88605.html Wolfgang