pub fn calculate_day_offset(date: NaiveDate, reference_date: NaiveDate) -> i64Expand description
Number of days between date and reference_date.
Positive means date is after the reference. Negative means before.
use shift_algorithm::calculate_day_offset;
use chrono::NaiveDate;
let ref_date = NaiveDate::from_ymd_opt(2025, 12, 15).unwrap();
let target = NaiveDate::from_ymd_opt(2025, 12, 20).unwrap();
assert_eq!(calculate_day_offset(target, ref_date), 5);
assert_eq!(calculate_day_offset(ref_date, target), -5);