I need to create a document that has section titles named "October 1, 2012", "October 2, 2012", etc., like this:
\section{October 1, 2012}
This is text for the first day.
\section{October 2, 2012}
This is text for the second day.
Is there a simple way to create a counter, set to the initial date, and then to increment it? E.g.:
\section{\insertdate\incrementdate}
This is text for the first day.
\section{\insertdate\incrementdate}
This is text for the second day.
- This would need to know about leap years.
- When displayed in the table of contents, this should match the sections.
In some situations, I may need to query the current value of year, month, and day, e.g.:
This is month \month and year \year.
This would display:
This is month 10 and year 2012.
In other situations, I may need to use the current value of year, month, and day, in a conditional, e.g.:
IF day IS 1, THEN:
"This is the start of a new month."
ELSE:
"It is not the start of a new month."
How can such a counter be created in ConTeXt?