Skip to main content

date_add_span

Function date_add_span 

Source
pub fn date_add_span(days_since_epoch: i32, months: i32, days: i32) -> i32
Expand description

Add a calendar span (months, then days) to a date held as days since 1970-01-01 — the civil Date + Span every tier computes: months clamp at the end of the month and respect leap years (Jan 31 + 1 month = Feb 28/29), then whole days roll over. Month and day arithmetic wraps at i32, as Int span arithmetic does everywhere. Date - Span is this with both parts negated.