| Copyright | (C) 2017 Jason Johnson |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Jason Johnson <jason.johnson.081@gmail.com> |
| Stability | experimental |
| Portability | POSIX, Windows |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Data.HodaTime.Calendar.Julian
Contents
Description
This is the module for CalendarDate and CalendarDateTime in the Julian calendar. The Julian calendar has a simple leap year rule - every fourth year is a leap year, with none of the
century exceptions that Gregorian later added to keep the calendar aligned to the solar year. It is proleptic in that, while it only started in 45 BC, this
implementation applies that rule uniformly and does not try to account for the fact that before around 4 AD the leap year rule was accidentally implemented as a leap year every three years. This
implementation stores the year unsigned, so its supported range is AD 1 onward (BC years are not representable). Dates share the same absolute timeline as every other calendar, so in the modern
era a Julian date reads 13 days behind the same instant's Gregorian date.
Synopsis
- calendarDate :: DayOfMonth -> Month Julian -> Year -> Maybe (CalendarDate Julian)
- fromNthDay :: DayNth -> DayOfWeek Julian -> Month Julian -> Year -> Maybe (CalendarDate Julian)
- fromWeekDate :: WeekNumber -> DayOfWeek Julian -> Year -> Maybe (CalendarDate Julian)
- data family Month cal
- data family DayOfWeek cal
- data Julian
Constructors
calendarDate :: DayOfMonth -> Month Julian -> Year -> Maybe (CalendarDate Julian) Source #
Smart constructor for a Julian calendar date.
fromNthDay :: DayNth -> DayOfWeek Julian -> Month Julian -> Year -> Maybe (CalendarDate Julian) Source #
fromWeekDate :: WeekNumber -> DayOfWeek Julian -> Year -> Maybe (CalendarDate Julian) Source #
Smart constructor for a Julian calendar date given as a week date. Note that this method assumes weeks start on Sunday and the first week of the year is the one
which has at least one day in the new year.
Types
data family Month cal Source #
Instances
data family DayOfWeek cal Source #