Safe Haskell  Trustworthy 

Language  Haskell2010 
Synopsis
 data Day
 type Year = Integer
 type DayOfYear = Int
 type WeekOfYear = Int
 toOrdinalDate :: Day > (Integer, Int)
 fromOrdinalDate :: Integer > Int > Day
 pattern YearDay :: Year > DayOfYear > Day
 fromOrdinalDateValid :: Integer > Int > Maybe Day
 showOrdinalDate :: Day > String
 isLeapYear :: Integer > Bool
 mondayStartWeek :: Day > (Int, Int)
 sundayStartWeek :: Day > (Int, Int)
 fromMondayStartWeek :: Integer > Int > Int > Day
 fromMondayStartWeekValid :: Integer > Int > Int > Maybe Day
 fromSundayStartWeek :: Integer > Int > Int > Day
 fromSundayStartWeekValid :: Integer > Int > Int > Maybe Day
Documentation
The Modified Julian Day is a standard count of days, with zero being the day 18581117.
Instances
Enum Day  
Eq Day  
Data Day  
Defined in Data.Time.Calendar.Days gfoldl :: (forall d b. Data d => c (d > b) > d > c b) > (forall g. g > c g) > Day > c Day # gunfold :: (forall b r. Data b => c (b > r) > c r) > (forall r. r > c r) > Constr > c Day # dataTypeOf :: Day > DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) > Maybe (c Day) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) > Maybe (c Day) # gmapT :: (forall b. Data b => b > b) > Day > Day # gmapQl :: (r > r' > r) > r > (forall d. Data d => d > r') > Day > r # gmapQr :: forall r r'. (r' > r > r) > r > (forall d. Data d => d > r') > Day > r # gmapQ :: (forall d. Data d => d > u) > Day > [u] # gmapQi :: Int > (forall d. Data d => d > u) > Day > u # gmapM :: Monad m => (forall d. Data d => d > m d) > Day > m Day # gmapMp :: MonadPlus m => (forall d. Data d => d > m d) > Day > m Day # gmapMo :: MonadPlus m => (forall d. Data d => d > m d) > Day > m Day #  
Ord Day  
Ix Day  
NFData Day  
Defined in Data.Time.Calendar.Days  
ISO8601 Day 

Defined in Data.Time.Format.ISO8601 iso8601Format :: Format Day # 
Day of year, in range 1 (January 1st) to 366. December 31st is 365 in a common year, 366 in a leap year.
type WeekOfYear = Int Source #
Week of year, by various reckonings, generally in range 053 depending on reckoning
toOrdinalDate :: Day > (Integer, Int) #
Convert to ISO 8601 Ordinal Date format. First element of result is year (proleptic Gregoran calendar), second is the day of the year, with 1 for Jan 1, and 365 (or 366 in leap years) for Dec 31.
fromOrdinalDate :: Integer > Int > Day #
Convert from ISO 8601 Ordinal Date format. Invalid day numbers will be clipped to the correct range (1 to 365 or 366).
pattern YearDay :: Year > DayOfYear > Day Source #
Bidirectional abstract constructor for ISO 8601 Ordinal Date format. Invalid day numbers will be clipped to the correct range (1 to 365 or 366).
fromOrdinalDateValid :: Integer > Int > Maybe Day #
Convert from ISO 8601 Ordinal Date format.
Invalid day numbers return Nothing
showOrdinalDate :: Day > String #
Show in ISO 8601 Ordinal Date format (yyyyddd)
isLeapYear :: Integer > Bool #
Is this year a leap year according to the proleptic Gregorian calendar?
mondayStartWeek :: Day > (Int, Int) #
Get the number of the Mondaystarting 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
).
sundayStartWeek :: Day > (Int, Int) #
Get the number of the Sundaystarting 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
).
:: Integer  Year. 
> Int  Mondaystarting week number (as 
> Int  Day of week.
Monday is 1, Sunday is 7 (as 
> Day 
The inverse of mondayStartWeek
. Get a Day
given the year,
the number of the Mondaystarting week, 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
).
:: Integer  Year. 
> Int  Mondaystarting week number (as 
> Int  Day of week.
Monday is 1, Sunday is 7 (as 
> Maybe Day 
:: Integer  Year. 
> Int  Sundaystarting week number (as 
> Int  Day of week
Sunday is 0, Saturday is 6 (as 
> Day 
The inverse of sundayStartWeek
. Get a Day
given the year and
the number of the day of a Sundaystarting week.
The first Sunday is the first day of week 1, any earlier days in the
year are week 0 (as %U
in formatTime
).
:: Integer  Year. 
> Int  Sundaystarting week number (as 
> Int  Day of week.
Sunday is 0, Saturday is 6 (as 
> Maybe Day 