Import with #import "std/calendar".
LeapYear :: (year: s32) -> boolDaysInMonth :: (year: s32, month: s32) -> s32DayOfWeek :: (year: s32, month: s32, day: s32) -> s32Sunday is zero. Gregorian arithmetic avoids mktime's timezone changes when asking for the weekday of a calendar date.
DayOfYear :: (year: s32, month: s32, day: s32) -> s32DateTimeValid :: (value: LocalDateTime) -> boolFormatDateTime :: (value: LocalDateTime, pattern: string, output: []u8) -> stringLocale-independent English names and common strftime-style civil tokens. Unsupported tokens, invalid readings, or insufficient space return an empty view and clear output[0]. A successful result is NUL-terminated.