#import, file "../src/screens/statistics_date_rules.zi"; #program_export Answer :: () -> s32 { if statistics_day_offset_from_today(20240229, 20240301) != 1 || statistics_day_offset_from_today(20230228, 20230301) != 1 || statistics_day_offset_from_today(20241231, 20250101) != 1 { return 0 } // These date pairs straddle daylight-saving changes in many locales. if statistics_day_offset_from_today(20240310, 20240311) != 1 || statistics_day_offset_from_today(20241103, 20241104) != 1 { return 0 } if statistics_day_offset_from_today(20230930, 20231030) != 30 || statistics_day_offset_from_today(20230929, 20231030) != -1 || statistics_day_offset_from_today(20240230, 20240301) != -1 || statistics_day_offset_from_today(20240302, 20240301) != -1 { return 0 } return 42 }