Expand description
Dates the people store keeps (birthdays, important dates). They are
machine dates the model fills: ISO 8601 YYYY-MM-DD, or --MM-DD when
the year is unknown. Nothing else is read: a month name or a
05/03-style date is locale prose (May 3 or March 5?), and a wrong
reading sends a reminder on the wrong day.
Constants§
- DATE_
FACT_ CATEGORIES - The categories of person facts whose value is such a date.
Functions§
- date_
argument_ error - Why a date argument was refused, for the model to correct.
- days_
until_ anniversary - Days from
todayuntil the date’s next anniversary (0 today), orNonewhenvalueis not an ISO date or the day does not occur this year (Feb 29 outside a leap year). - is_
date_ fact_ category - Whether a person-fact
categoryholds a date. - legacy_
date_ to_ iso - A value stored before dates were ISO only, rewritten as ISO the way
the old reader understood it:
YYYY-M-D, numeric month first (3/15,03-15: March 15, as the old code read them), or an English month name and a day (March 15,march 15,).Nonewhenvalueis already ISO or the old reader could not read it either; those stay as written. - parse_
month_ day - The
(month, day)of an ISO dateYYYY-MM-DDor a yearless--MM-DD;Nonefor anything else.