Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

YearFlags

Year flags (aka the dominical letter).

YearFlags are used as the last four bits of NaiveDate, Mdf and IsoWeek.

There are 14 possible classes of year in the Gregorian calendar: common and leap years starting with Monday through Sunday.

The YearFlags stores this information into 4 bits LWWW. L is the leap year flag, with 1 for the common year (this simplifies validating an ordinal in NaiveDate). WWW is a non-zero Weekday of the last day in the preceding year.

Fully qualified path: chrono::internals::YearFlags

[derive(Clone, Copy, PartialEq, Drop, Debug)]
pub struct YearFlags { /* private fields */ }