Expand description
ISO 8601 calendar date without timezone.
The implementation is optimized for determining year, month, day and day of week.
Format of NaiveDate
:
YYYY_YYYY_YYYY_YYYY_YYYO_OOOO_OOOO_LWWW
Y
: Year
O
: Ordinal
L
: leap year flag (1 = common year, 0 is leap year)
W
: weekday before the first day of the year
LWWW
: will also be referred to as the year flags (F
)
Modulesยง
- serde ๐
Structsยง
- Naive
Date - ISO 8601 calendar date without timezone. Allows for every proleptic Gregorian date from Jan 1, 262145 BCE to Dec 31, 262143 CE. Also supports the conversion from ISO 8601 ordinal and week date.
- Naive
Date Days Iterator - Iterator over
NaiveDate
with a step size of one day. - Naive
Date Weeks Iterator - Iterator over
NaiveDate
with a step size of one week.
Constantsยง
- LEAP_
YEAR_ ๐MASK - MAX_
DATE Deprecated - The maximum possible
NaiveDate
(December 31, 262143 CE). - MAX_OL ๐
- MAX_
YEAR ๐ - MAX_YEAR is one year less than the type is capable of representing. Internally we may sometimes
use the headroom, notably to handle cases where the offset of a
DateTime
constructed withNaiveDate::MAX
pushes it beyond the valid, representable range. - MIN_
DATE Deprecated - The minimum possible
NaiveDate
(January 1, 262145 BCE). - MIN_
YEAR ๐ - MIN_YEAR is one year more than the type is capable of representing. Internally we may sometimes
use the headroom, notably to handle cases where the offset of a
DateTime
constructed withNaiveDate::MIN
pushes it beyond the valid, representable range. - OL_MASK ๐
- ORDINAL_
MASK ๐ - WEEKDAY_
FLAGS_ ๐MASK - YEAR_
DELTAS ๐ - YEAR_
FLAGS_ ๐MASK
Functionsยง
- cycle_
to_ ๐yo - div_
mod_ ๐floor - yo_
to_ ๐cycle