Expand description
Calendar dates in the proleptic Gregorian calendar, times of day, and the two together.
The arithmetic counts days since 1970-01-01 with Howard Hinnant’s civil-calendar
algorithms, which are exact for every date an i32 year can hold.
Date and TimeOfDay carry no time zone. DateTime carries the offset from UTC of
the moment it holds, and local_offset_minutes reads that offset from the system; where the
system does not say, local_offset returns None instead of a made-up zero.
Structs§
- Date
- A calendar date.
- Date
Time - A date and a time of day together, with the offset from UTC the moment was read at.
- Time
OfDay - A time of day on a 24-hour clock, with no date and no time zone.
Enums§
- Weekday
- A day of the week.
Functions§
- days_
in_ month - How many days
monthofyearhas; 0 for a month outside 1 to 12. - is_
leap_ year - Whether
yearhas a February 29. - local_
offset - Minutes local time is ahead of UTC right now, or
Nonewhen the system does not say. - local_
offset_ minutes - Minutes local time is ahead of UTC right now, and 0 when the system does not say.