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.OrdinalDate

  • 4 types
  • 11 values
  • Packagerebase-1.21.2
  • Exports16
  • LanguageHaskell2010
  • LicenceMIT
  • SourceDays.hs
newtypenewtype Day
#

The Modified Julian Day is a standard count of days, with zero being the day 1858-11-17.

Instances16Enum, Eq, Data, Ord, Read, Show, …
  • Enum DayDefined in time-1.12.2 · Data.Time.Calendar.Days
  • Eq DayDefined in time-1.12.2 · Data.Time.Calendar.Days
  • Data DayDefined in time-1.12.2 · Data.Time.Calendar.Days
  • Ord DayDefined in time-1.12.2 · Data.Time.Calendar.Days
  • Read DayDefined in time-1.12.2 · Data.Time.Format.Parse · orphan
  • Show DayDefined in time-1.12.2 · Data.Time.Calendar.Gregorian · orphan
  • Ix DayDefined in time-1.12.2 · Data.Time.Calendar.Days
  • Generic DayDefined in time-compat-1.9.8 · Data.Time.Orphans · orphan
  • NFData DayDefined in time-1.12.2 · Data.Time.Calendar.Days
  • Hashable DayDefined in time-compat-1.9.8 · Data.Time.Orphans · orphan
  • DayPeriod DayDefined in time-1.12.2 · Data.Time.Calendar.Days
  • FormatTime DayDefined in time-1.12.2 · Data.Time.Format.Format.Instances · orphan
  • ParseTime DayDefined in time-1.12.2 · Data.Time.Format.Parse.Instances · orphan
  • ISO8601 DayDefined in time-1.12.2 · Data.Time.Format.ISO8601

    yyyy-mm-dd (ISO 8601:2004(E) sec. 4.1.2.2 extended format)

  • Lift DayDefined in time-compat-1.9.8 · Data.Time.Orphans · orphan
  • type Rep Day = D1 ('MetaData "Day" "Data.Time.Calendar.Days" "time-1.12.2-cfd2" 'True) (C1 ('MetaCons "ModifiedJulianDay" 'PrefixI 'True) (S1 ('MetaSel ('Just "toModifiedJulianDay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))Defined in time-compat-1.9.8 · Data.Time.Orphans · orphan
valueisLeapYear :: Year -> Bool
#

Is this year a leap year according to the proleptic Gregorian calendar?

typetype Year = Integer
#

Year of Common Era (when positive).

valuefromOrdinalDate :: Year -> DayOfYear -> Day
#

Convert from ISO 8601 Ordinal Date format. Invalid day numbers will be clipped to the correct range (1 to 365 or 366).

typetype DayOfYear = Int
#

Day of year, in range 1 (January 1st) to 366. December 31st is 365 in a common year, 366 in a leap year.

patternpattern YearDay :: Year -> DayOfYear -> Day
#

Bidirectional abstract constructor for ISO 8601 Ordinal Date format. Invalid day numbers will be clipped to the correct range (1 to 365 or 366).

valuemondayStartWeek :: Day -> (WeekOfYear, Int)
#

Get the number of the Monday-starting week in the year and the day of the week. The first Monday is the first day of week 1, any earlier days in the year are week 0 (as %W in Data.Time.Format.formatTime). Monday is 1, Sunday is 7 (as %u in Data.Time.Format.formatTime).

valuesundayStartWeek :: Day -> (WeekOfYear, Int)
#

Get the number of the Sunday-starting week in the year and the day of the week. The first Sunday is the first day of week 1, any earlier days in the year are week 0 (as %U in Data.Time.Format.formatTime). Sunday is 0, Saturday is 6 (as %w in Data.Time.Format.formatTime).

typetype WeekOfYear = Int
#

Week of year, by various reckonings, generally in range 0-53 depending on reckoning.

valuefromMondayStartWeek
  1. :: Year

    Year.

  2. -> WeekOfYear

    Monday-starting week number (as %W in Data.Time.Format.formatTime).

  3. -> Int

    Day of week. Monday is 1, Sunday is 7 (as %u in Data.Time.Format.formatTime).

  4. -> Day
#

The inverse of mondayStartWeek. Get a Day given the year, the number of the Monday-starting week, and the day of the week. The first Monday is the first day of week 1, any earlier days in the year are week 0 (as %W in Data.Time.Format.formatTime).

valuefromSundayStartWeek
  1. :: Year

    Year.

  2. -> WeekOfYear

    Sunday-starting week number (as %U in Data.Time.Format.formatTime).

  3. -> Int

    Day of week Sunday is 0, Saturday is 6 (as %w in Data.Time.Format.formatTime).

  4. -> Day
#

The inverse of sundayStartWeek. Get a Day given the year and the number of the day of a Sunday-starting week. The first Sunday is the first day of week 1, any earlier days in the year are week 0 (as %U in Data.Time.Format.formatTime).