Modulererebase-1.21.2Haskell2010
Data.Time.Calendar.WeekDate
- 4 types
- 8 values
- Packagererebase-1.21.2
- Exports13
- LanguageHaskell2010
- LicenceMIT
- SourceTypes.hs
Year of Common Era (when positive).
Instances11Enum, Eq, Data, Ord, Read, Show, …
Enum DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.WeekEq DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.WeekData DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.WeekOrd DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.WeekRead DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.WeekShow DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.WeekIx DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.WeekNFData DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.WeekHashable DayOfWeekDefined in time-compat-1.9.8 · Data.Time.Orphans · orphanFormatTime DayOfWeekDefined in time-1.12.2 · Data.Time.Format.Format.Instances · orphanLift DayOfWeekDefined in time-compat-1.9.8 · Data.Time.Orphans · orphan
Bidirectional abstract constructor for ISO 8601 Week Date format. Invalid week values will be clipped to the correct range.
Week of year, by various reckonings, generally in range 0-53 depending on reckoning.
Convert from ISO 8601 Week Date format. First argument is year, second week number (1-52 or 53), third day of week (1 for Monday to 7 for Sunday). Invalid week and day values will return Nothing.
Constructors
FirstWholeWeekfirst week is the first whole week of the year
FirstMostWeekfirst week is the first week with four days in the year
Instances2Eq, Lift
Eq FirstWeekTypeDefined in time-1.12.2 · Data.Time.Calendar.WeekDateLift FirstWeekTypeDefined in time-compat-1.9.8 · Data.Time.Orphans · orphan
Convert to ISO 8601 Week Date format. First element of result is year, second week number (1-53), third day of week (1 for Monday to 7 for Sunday). Note that "Week" years are not quite the same as Gregorian years, as the first day of the year is always a Monday. The first week of a year is the first week to contain at least four days in the corresponding Gregorian year.
fromWeekCalendar :: FirstWeekTypehow to reckon the first week of the year
-> DayOfWeekthe first day of each week
-> Year-> WeekOfYear-> DayOfWeek-> Day
Convert from the given kind of "week calendar". Invalid week and day values will be clipped to the correct range.
fromWeekCalendarValid :: FirstWeekTypehow to reckon the first week of the year
-> DayOfWeekthe first day of each week
-> Year-> WeekOfYear-> DayOfWeek-> Maybe Day
Convert from the given kind of "week calendar". Invalid week and day values will return Nothing.
Convert from ISO 8601 Week Date format. First argument is year, second week number (1-52 or 53), third day of week (1 for Monday to 7 for Sunday). Invalid week and day values will be clipped to the correct range.
Show in ISO 8601 Week Date format as yyyy-Www-d (e.g. "2006-W46-3").
toWeekCalendar :: FirstWeekTypehow to reckon the first week of the year
-> DayOfWeekthe first day of each week
-> Day-> (Year, WeekOfYear, DayOfWeek)
Convert to the given kind of "week calendar". Note that the year number matches the weeks, and so is not always the same as the Gregorian year number.