Skip to main content

civil_from_days

Function civil_from_days 

Source
pub const fn civil_from_days(days: u64) -> (u64, u32, u32)
Expand description

Converts days since 1970-01-01 to a Gregorian (year, month, day).

Howard Hinnant’s civil_from_days algorithm, in unsigned arithmetic. The shift to a March-based year keeps the leap-day correction uniform.