HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Moduletime-1.16.0.1GHC2021

Data.Time.Calendar.OrdinalDate

ISO 8601 Ordinal Date format

  • 4 types
  • 11 values
  • Packagetime-1.16.0.1
  • Exports16
  • LanguageGHC2021
  • LicenceBSD-2-Clause
  • SourceOrdinalDate.hs
newtypenewtype Day
#

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

Instances15Enum, Eq, Data, Ord, Read, Show, …
  • Enum DayDefined in time-1.16.0.1 · Data.Time.Calendar.Days
  • Eq DayDefined in time-1.16.0.1 · Data.Time.Calendar.Days
  • Data DayDefined in time-1.16.0.1 · Data.Time.Calendar.Days
  • Ord DayDefined in time-1.16.0.1 · Data.Time.Calendar.Days
  • Read DayDefined in time-1.16.0.1 · Data.Time.Format.Parse · orphan
  • Show DayDefined in time-1.16.0.1 · Data.Time.Calendar.Gregorian · orphan
  • Ix DayDefined in time-1.16.0.1 · Data.Time.Calendar.Days
  • Generic DayDefined in time-1.16.0.1 · Data.Time.Calendar.Days
  • NFData DayDefined in time-1.16.0.1 · Data.Time.Calendar.Days
  • DayPeriod DayDefined in time-1.16.0.1 · Data.Time.Calendar.Days
  • FormatTime DayDefined in time-1.16.0.1 · Data.Time.Format.Format.Instances · orphan
  • ParseTime DayDefined in time-1.16.0.1 · Data.Time.Format.Parse.Instances · orphan
  • ISO8601 DayDefined in time-1.16.0.1 · Data.Time.Format.ISO8601

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

  • Lift DayDefined in time-1.16.0.1 · Data.Time.Calendar.Days
  • type Rep Day = D1 ('MetaData "Day" "Data.Time.Calendar.Days" "time-1.16.0.1-ea35" 'True) (C1 ('MetaCons "ModifiedJulianDay" 'PrefixI 'True) (S1 ('MetaSel ('Just "toModifiedJulianDay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))Defined in time-1.16.0.1 · Data.Time.Calendar.Days
typetype Year = Integer
#

Year of Common Era (when positive).

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.

typetype WeekOfYear = Int
#

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

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

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

valueisLeapYear :: Year -> Bool
#

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

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 formatTime). Monday is 1, Sunday is 7 (as %u in 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 formatTime). Sunday is 0, Saturday is 6 (as %w in formatTime).