HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduletime-1.16.0.1GHC2021

Data.Time.Calendar.OrdinalDate

ISO 8601 Ordinal Date format

Synopsis
  • 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-dda8" '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 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).

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

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