Safe Haskell | None |
---|
- class Date d where
- toDateStruct :: d -> DateStruct
- fromDateStruct :: DateStruct -> d
- class Zone z where
- class DateZone dz where
- toDateZoneStruct :: dz -> DateZoneStruct
- fromDateZoneStruct :: DateZoneStruct -> dz
- class DateTime dt where
- toDateTimeStruct :: dt -> DateTimeStruct
- fromDateTimeStruct :: DateTimeStruct -> dt
- class DateTimeZone dtz where
- toDateTimeZoneStruct :: dtz -> DateTimeZoneStruct
- fromDateTimeZoneStruct :: DateTimeZoneStruct -> dtz
- class DateTimeMath a b where
- plus :: a -> b -> a
- data DateStruct = DateStruct {}
- data DateZoneStruct = DateZoneStruct {}
- data DateTimeStruct = DateTimeStruct {}
- data DateTimeZoneStruct = DateTimeZoneStruct {}
- newtype Year = Year {}
- newtype Month = Month {}
- newtype Day = Day {}
- data DayOfWeek
- newtype Hour = Hour {}
- newtype Minute = Minute {}
- newtype Second = Second {}
- newtype Millis = Millis {}
- newtype Micros = Micros {}
- newtype Nanos = Nanos {}
- newtype Picos = Picos {}
- class Pretty a where
- prettyMonth :: Month -> String
- prettyDay :: Day -> String
- prettyHour :: Hour -> (Hour, String)
- properFracMillis :: Floating a => RealFrac a => a -> (Second, Millis)
- properFracMicros :: Floating a => RealFrac a => a -> (Second, Micros)
- properFracNanos :: Floating a => RealFrac a => a -> (Second, Nanos)
- properFracPicos :: Floating a => RealFrac a => a -> (Second, Picos)
- epochToDate :: Year -> Month -> Day -> Day
- epochToYear :: Year -> Day
- yearToMonth :: Month -> Bool -> Day
- dateToTime :: Hour -> Minute -> Second -> Second
- isLeapYear :: Year -> Bool
Documentation
toDateStruct :: d -> DateStructSource
fromDateStruct :: DateStruct -> dSource
toDateZoneStruct :: dz -> DateZoneStructSource
fromDateZoneStruct :: DateZoneStruct -> dzSource
toDateTimeStruct :: dt -> DateTimeStructSource
fromDateTimeStruct :: DateTimeStruct -> dtSource
class DateTimeZone dtz whereSource
toDateTimeZoneStruct :: dtz -> DateTimeZoneStructSource
class DateTimeMath a b whereSource
prettyMonth :: Month -> StringSource
Shows the given month as a string.
prettyHour :: Hour -> (Hour, String)Source
Returns the given hour in AM-PM format.
properFracMillis :: Floating a => RealFrac a => a -> (Second, Millis)Source
Decomposes a floating point number into second and millisecond components.
properFracMicros :: Floating a => RealFrac a => a -> (Second, Micros)Source
Decomposes a floating point number into second and microsecond components.
properFracNanos :: Floating a => RealFrac a => a -> (Second, Nanos)Source
Decomposes a floating point number into second and nanosecond components.
properFracPicos :: Floating a => RealFrac a => a -> (Second, Picos)Source
Decomposes a floating point number into second and picosecond components.
epochToDate :: Year -> Month -> Day -> DaySource
Calculates the number of days that have elapsed between Unix epoch and the given date.
epochToYear :: Year -> DaySource
Calculates the number of days that have elapsed between Unix epoch and the given year.
yearToMonth :: Month -> Bool -> DaySource
Calculates the number of days that have elapsed between January 1st and the given month.
dateToTime :: Hour -> Minute -> Second -> SecondSource
Calculates the number of seconds that have elapsed between midnight and the given time.
isLeapYear :: Year -> BoolSource
Checks if the given year is a leap year.