|
| static int | is_leap (int year) |
| | Whether a year is a leap year, by the usual rule.
|
| static int | dec31_wday (int year) |
| | The weekday December 31st lands on for a year.
|
| int | date_iso_weeks_in_year (int year) |
| | How many ISO 8601 weeks a year holds, either 52 or 53.
|
| static int | raw_week (int yday, int wday) |
| | The week number worked out from the date alone, before the year boundary is taken into account.
|
| int | date_iso_week (int year, int yday, int wday) |
| | The ISO 8601 week number, which always counts weeks from Monday.
|
| int | date_iso_week_year (int year, int yday, int wday) |
| | The ISO 8601 year the week number belongs to, which is not always the calendar year.
|
| int | date_day_of_year (int yday) |
| | Which day of the year it is, counting January 1st as day 1.
|
| int | date_days_left_in_year (int year, int yday) |
| | How many days are left before the year ends, so December 31st reads 0.
|
| int | date_days_in_month (int year, int mon0) |
| | How many days a month has, with February getting its leap day.
|
| int | date_first_wday (int wday, int mday) |
| | The weekday the 1st of the month lands on, walked back from today's weekday.
|
Pure calendar math, host-testable off-device.