polars_time/windows/
calendar.rs
1pub(crate) const DAYS_PER_MONTH: [[i64; 12]; 2] = [
2 [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ];
6
7pub(crate) const fn is_leap_year(year: i32) -> bool {
8 year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)
9}
10pub const NS_MICROSECOND: i64 = 1_000;
12pub const NS_MILLISECOND: i64 = 1_000_000;
13pub const NS_SECOND: i64 = 1_000_000_000;
14pub const NS_MINUTE: i64 = 60 * NS_SECOND;
15pub const NS_HOUR: i64 = 60 * NS_MINUTE;
16pub const NS_DAY: i64 = 24 * NS_HOUR;
17pub const NS_WEEK: i64 = 7 * NS_DAY;