README (1452B)
1 The time::date module implements the common international Gregorian chronology, 2 based on the astronomically numbered proleptic Gregorian calendar and the ISO 3 week-numbering calendar, as per the ISO 8601 standard, and the common 24 hour 4 clock. It provides [[date]], a representation of civil date/time and a optimized 5 extension of the [[time::chrono::moment]] type. The [[time::chrono::]] module 6 has many useful functions which interoperate with dates. Any [[time::chrono::]] 7 function which accepts *moment also accepts *date. 8 9 Dates are created using [[new]], [[now]], [[localnow]], or a "from_" function. 10 Alternatively, the [[virtual]]/[[realize]] interface can handle uncertain or 11 invalid date/time information, and construct new dates incrementally and safely. 12 The observer functions ([[year]], [[hour]], etc.) evaluate a date's observed 13 chronological values, adjusted for its associated [[time::chrono::locality]]. 14 Use [[in]] to localize a date to another locality; consult [[time::chrono::tz]]. 15 See [[parse]] and [[format]] for working with date/time strings. 16 17 Date arithmetic operations are categorized into "timescalar" or "chronological". 18 Timescalar uses [[time::duration]]; see [[add]], [[time::chrono::diff]]. 19 Chronological uses [[period]]; see [[reckon]], [[pdiff]], [[unitdiff]], 20 [[truncate]]. Note that calendrical arithmetic is highly irregular due to field 21 overflows and timezone discontinuities, so think carefully about what you want.