Year of Common Era (when positive).
Moduletime-1.12.2Haskell2010
Data.Time.Calendar.WeekDate
Week-based calendars
- 4 types
- 8 values
- Packagetime-1.12.2
- Exports13
- LanguageHaskell2010
- LicenceBSD-2-Clause
- SourceWeekDate.hs
Week of year, by various reckonings, generally in range 0-53 depending on reckoning.
Instances9Enum, 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.WeekFormatTime DayOfWeekDefined in time-1.12.2 · Data.Time.Format.Format.Instances · orphan
Constructors
FirstWholeWeekfirst week is the first whole week of the year
FirstMostWeekfirst week is the first week with four days in the year
Instances1Eq
Eq FirstWeekTypeDefined in time-1.12.2 · Data.Time.Calendar.WeekDate
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.
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.
ISO 8601 Week Date format
5 declarationsConvert 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.
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.
Bidirectional abstract constructor for ISO 8601 Week Date format. Invalid week values will be clipped to the correct range.
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.
Show in ISO 8601 Week Date format as yyyy-Www-d (e.g. "2006-W46-3").