HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulerebase-1.21.2Haskell2010

Rebase.Data.Time.Calendar.WeekDate

  • 4 types
  • 8 values
  • Packagerebase-1.21.2
  • Exports13
  • LanguageHaskell2010
  • LicenceMIT
  • SourceTypes.hs
typetype Year = Integer
#

Year of Common Era (when positive).

datadata DayOfWeek
#
Instances11Enum, Eq, Data, Ord, Read, Show, …
  • Enum DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week

    "Circular", so for example [Tuesday ..] gives an endless sequence. Also: fromEnum gives [1 .. 7] for [Monday .. Sunday], and toEnum performs mod 7 to give a cycle of days.

  • Eq DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week
  • Data DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week
  • Ord DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week
  • Read DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week
  • Show DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week
  • Ix DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week
  • NFData DayOfWeekDefined in time-1.12.2 · Data.Time.Calendar.Week
  • Hashable DayOfWeekDefined in time-compat-1.9.8 · Data.Time.Orphans · orphan
  • FormatTime DayOfWeekDefined in time-1.12.2 · Data.Time.Format.Format.Instances · orphan
  • Lift DayOfWeekDefined in time-compat-1.9.8 · Data.Time.Orphans · orphan
patternpattern YearWeekDay :: Year -> WeekOfYear -> DayOfWeek -> Day
#

Bidirectional abstract constructor for ISO 8601 Week Date format. Invalid week values will be clipped to the correct range.

typetype WeekOfYear = Int
#

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.

valuefromWeekDate :: Year -> WeekOfYear -> Int -> Day
#

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.

valuetoWeekDate :: Day -> (Year, WeekOfYear, Int)
#

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.