Adds convenience functions to some structs.
Datetimes with a variable UTC offset, and time zone calculations.
A duration is a length of time on the timeline, irrespective of time zone or calendar format, with millisecond precision.
An instant is an exact point on the timeline, irrespective of time zone or calendar format, with millisecond precision.
A local date is a day-long span on the timeline, without a time zone.
A local date-time is an exact instant on the timeline, without a time zone.
A local time is a time on the timeline that recurs once a day, without a time zone.
A time zone, which here is a list of timespans, each containing a fixed offset for the current location’s time from UTC.
A single year.
A month-year pair.
A month of the year, starting with January, and ending with December.
A named day of the week.
The date piece trait is used for date and time values that have date components of years, months, and days.
The time piece trait is used for date and time values that have time components of hours, minutes, and seconds.
Attempts to determine the system’s current time zone. There’s no
guaranteed way to do this, so this function returns