Safe Haskell | Safe-Infered |
---|
Data.Time.Calendar.JulianYearDay
Contents
- toJulianYearAndDay :: Day -> (Integer, Int)
- fromJulianYearAndDay :: Integer -> Int -> Day
- fromJulianYearAndDayValid :: Integer -> Int -> Maybe Day
- showJulianYearAndDay :: Day -> String
- isJulianLeapYear :: Integer -> Bool
Year and day format
toJulianYearAndDay :: Day -> (Integer, Int)Source
convert to proleptic Julian year and day format. First element of result is year (proleptic Julian calendar), second is the day of the year, with 1 for Jan 1, and 365 (or 366 in leap years) for Dec 31.
fromJulianYearAndDay :: Integer -> Int -> DaySource
convert from proleptic Julian year and day format. Invalid day numbers will be clipped to the correct range (1 to 365 or 366).
fromJulianYearAndDayValid :: Integer -> Int -> Maybe DaySource
convert from proleptic Julian year and day format. Invalid day numbers will return Nothing
showJulianYearAndDay :: Day -> StringSource
show in proleptic Julian year and day format (yyyy-ddd)
isJulianLeapYear :: Integer -> BoolSource
Is this year a leap year according to the proleptic Julian calendar?