time-1.4: A time library

Safe HaskellSafe-Infered

Data.Time.Calendar.JulianYearDay

Contents

Synopsis

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?