Other types¶
This section contains API documentation for choice and other types, i.e. enums, unions, and literals.
- class whenever.Weekday(*values)[source]¶
Day of the week;
.valuecorresponds with ISO numbering (monday=1, sunday=7).All members are also available as constants in the module namespace:
>>> from whenever import Weekday, MONDAY, SUNDAY >>> MONDAY is Weekday.MONDAY True
Dateand other date-carrying types returnWeekdayfrom theirday_of_week()method:>>> Date(2024, 12, 25).day_of_week() Weekday.WEDNESDAY
- type whenever.RoundModeStr = Literal['ceil', 'expand', 'floor', 'trunc', 'half_ceil', 'half_expand', 'half_floor', 'half_trunc', 'half_even']¶
See Modes for more information.
- type whenever.DisambiguateStr = Literal['compatible', 'earlier', 'later', 'raise']¶
See Ambiguity in timezones for more information.
- type whenever.DeltaUnitStr = Literal['years', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds', 'nanoseconds']¶