days_from_civil

Function days_from_civil 

Source
pub const fn days_from_civil(year: i32, month: u8, day: u8) -> i64
Expand description

Days since 1970-01-01 for a proleptic Gregorian date.

Hinnant’s algorithm: shift the year so March is the first month, which puts the leap day at the end of the year and lets the day-of-year become a closed-form expression, then count 400-year eras — the cycle over which the Gregorian calendar exactly repeats.