Expand description
Calendar values for templates: run.date, run.now, date(), datetime() and the
periods built from them. Everything is worked out at render time, so compiled SQL holds
literals and a rerun with the same DRE_RUN_DATE renders the same text.
Three types:
Date: a calendar day. RendersYYYY-MM-DD.DateTime: an instant, shown in a timezone. RendersYYYY-MM-DD HH:MM:SS[.ffffff].Period: a run of whole days (a week, a month, …).startandendare its first and last instants;start.dateandend.dateits first and last days.
A Calendar (the run’s timezone, first day of the week and week numbering) travels with
every value, so navigation and conversions agree with the project’s settings.
Structs§
Enums§
- Week
Numbering - How weeks are numbered:
iso(week 1 holds the year’s first Thursday) orus(week 1 holds 1 January). - Week
Start - The first day of a week.
Constants§
- DATE_
ATTRS - Every attribute of a
Date, fordre validate’s check ofrun.date.<name>. - PERIOD_
PRESETS - The named periods
period()knows.