Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Thyme.Calendar
Description
Synopsis
- type Years = Int
- type Months = Int
- type Days = Int
- newtype Day = ModifiedJulianDay {}
- modifiedJulianDay :: Iso' Day Int
- type Year = Int
- type Month = Int
- type DayOfMonth = Int
- data YearMonthDay = YearMonthDay {}
- isLeapYear :: Year -> Bool
- yearMonthDay :: Iso' OrdinalDate YearMonthDay
- gregorian :: Iso' Day YearMonthDay
- gregorianValid :: YearMonthDay -> Maybe Day
- showGregorian :: Day -> String
- gregorianMonthLength :: Year -> Month -> Days
- gregorianMonthsClip :: Months -> YearMonthDay -> YearMonthDay
- gregorianMonthsRollover :: Months -> YearMonthDay -> YearMonthDay
- gregorianYearsClip :: Years -> YearMonthDay -> YearMonthDay
- gregorianYearsRollover :: Years -> YearMonthDay -> YearMonthDay
- _ymdYear :: Lens' YearMonthDay Year
- _ymdMonth :: Lens' YearMonthDay Month
- _ymdDay :: Lens' YearMonthDay DayOfMonth
Documentation
Days
The Modified Julian Day is a standard count of days, with zero being the day 1858-11-17.
Constructors
ModifiedJulianDay | |
Fields |
Instances
modifiedJulianDay :: Iso' Day Int Source #
Gregorian calendar
type DayOfMonth = Int Source #
data YearMonthDay Source #
Constructors
YearMonthDay | |
Instances
isLeapYear :: Year -> Bool Source #
Gregorian leap year?
yearMonthDay :: Iso' OrdinalDate YearMonthDay Source #
gregorian :: Iso' Day YearMonthDay Source #
gregorianValid :: YearMonthDay -> Maybe Day Source #
showGregorian :: Day -> String Source #
gregorianMonthsClip :: Months -> YearMonthDay -> YearMonthDay Source #
gregorianYearsClip :: Years -> YearMonthDay -> YearMonthDay Source #
_ymdYear :: Lens' YearMonthDay Year Source #
_ymdMonth :: Lens' YearMonthDay Month Source #
_ymdDay :: Lens' YearMonthDay DayOfMonth Source #
Orphan instances
Bounded YearMonthDay Source # | |
Bounded Day Source # | |
Arbitrary YearMonthDay Source # | |
Arbitrary Day Source # | |
CoArbitrary YearMonthDay Source # | |
Methods coarbitrary :: YearMonthDay -> Gen b -> Gen b Source # | |
Random YearMonthDay Source # | |
Methods randomR :: RandomGen g => (YearMonthDay, YearMonthDay) -> g -> (YearMonthDay, g) Source # random :: RandomGen g => g -> (YearMonthDay, g) Source # randomRs :: RandomGen g => (YearMonthDay, YearMonthDay) -> g -> [YearMonthDay] Source # randoms :: RandomGen g => g -> [YearMonthDay] Source # randomRIO :: (YearMonthDay, YearMonthDay) -> IO YearMonthDay Source # | |
Random Day Source # | |