Date and time functions
This set adds TODAY, NOW, DATE, YEAR, MONTH, DAY, EDATE, EOMONTH, DATEDIF, WEEKDAY and NETWORKDAYS, using a documented serial date system that is compatible with common spreadsheet conventions. The time zone is configurable, and cells can hold either native Date objects or serial numbers.
Planned. This page shows the specification from issue #192. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A task grid with Start, Duration, Due (=Start+Duration) and Workdays (=NETWORKDAYS(Start,Due)).
Expected behavior
Due dates render as dates rather than raw serials. Changing the time zone shifts the TODAY and NOW results consistently. Adding a holiday reduces the Workdays count.
Planned API surface
option: formulas.dateSystem ('1900'|'1904')option: formulas.timeZoneoption: formulas.dateInput ('date'|'serial'|'iso')function: toSerialDate / fromSerialDateAcceptance criteria
- The serial-date conversion round-trips for dates from 1900 to 9999. (pending)
- The 1900 leap-year compatibility quirk is documented and test-covered. (pending)
- Date arithmetic results keep a date display format. (pending)
- NOW and TODAY respect the configured time zone. (pending)