earthkit.time.calendar - Calendar-related utilities
- class earthkit.time.calendar.Weekday(*values)
enum.IntEnumrepresenting week days- MONDAY = 0
- TUESDAY = 1
- WEDNESDAY = 2
- THURSDAY = 3
- FRIDAY = 4
- SATURDAY = 5
- SUNDAY = 6
- earthkit.time.calendar.to_weekday(arg: int | str) Weekday
Convert integers and strings to weekdays
Any unambiguous prefix of a weekday name will be accepted, and case is ignored.
- earthkit.time.calendar.month_length(year: int, month: int) int
Return the number of days of a given month
- earthkit.time.calendar.day_exists(year: int, month: int, day: int) bool
Check whether a given day exists in the calendar
- class earthkit.time.calendar.MonthInYear(year: int, month: int)
Represent a given month in a year
- next() MonthInYear
Return the following month
- previous() MonthInYear
Return the previous month
- earthkit.time.calendar.parse_mmdd(arg: Tuple[int, int] | str) Tuple[int, int]
Convert pairs of ints or MMDD strings into (month, day) pairs