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