Copyright | 2013-2017 Enzo Haussecker |
---|---|
License | BSD3 |
Maintainer | Enzo Haussecker <enzo@sovereign.io> |
Stability | Stable |
Safe Haskell | None |
Language | Haskell2010 |
Basic definitions, including type classes, data types and type families.
- class Human x where
- type Components x :: *
- class Math x c where
- data Calendar
- data Epoch = Unix
- data family Era (cal :: Calendar) :: *
- newtype Year = Year {}
- data family Month (cal :: Calendar) :: *
- newtype Day = Day {}
- data family DayOfWeek (cal :: Calendar) :: *
- newtype Hour = Hour {}
- newtype Minute = Minute {}
- newtype Second = Second {}
- newtype Millis = Millis {}
- newtype Micros = Micros {}
- newtype Nanos = Nanos {}
- newtype Picos = Picos {}
- data DateStruct cal = DateStruct {}
- data TimeStruct = TimeStruct {}
- data DateTimeStruct cal = DateTimeStruct {}
- data LocalDateStruct cal = LocalDateStruct {}
- data LocalTimeStruct = LocalTimeStruct {}
- data LocalDateTimeStruct cal = LocalDateTimeStruct {}
- properFracMillis :: RealFrac a => a -> (Second, Millis)
- properFracMicros :: RealFrac a => a -> (Second, Micros)
- properFracNanos :: RealFrac a => a -> (Second, Nanos)
- properFracPicos :: RealFrac a => a -> (Second, Picos)
Classes
type Components x :: * Source #
Define the human-readable components of a timestamp.
pack :: Components x -> x Source #
Pack a timestamp from human-readable components.
unpack :: x -> Components x Source #
Unpack a timestamp to human-readable components.
duration :: x -> x -> c Source #
Calculate the duration between two timestamps.
Add a duration to a timestamp.
Chronologies
System for organizing dates.
System origin.
data family Era (cal :: Calendar) :: * Source #
System for numbering years.
Bounded (Era Gregorian) Source # | |
Enum (Era Gregorian) Source # | |
Eq (Era Gregorian) Source # | |
Data (Era Gregorian) Source # | |
Ord (Era Gregorian) Source # | |
Read (Era Gregorian) Source # | |
Show (Era Gregorian) Source # | |
Generic (Era Gregorian) Source # | |
NFData (Era Gregorian) Source # | |
data Era Gregorian Source # | |
type Rep (Era Gregorian) Source # | |
Components
Year.
data family Month (cal :: Calendar) :: * Source #
Month.
Bounded (Month Gregorian) Source # | |
Enum (Month Gregorian) Source # | |
Eq (Month Gregorian) Source # | |
Data (Month Gregorian) Source # | |
Ord (Month Gregorian) Source # | |
Read (Month Gregorian) Source # | |
Show (Month Gregorian) Source # | |
Generic (Month Gregorian) Source # | |
NFData (Month Gregorian) Source # | |
data Month Gregorian Source # | |
type Rep (Month Gregorian) Source # | |
Day.
Bounded Day Source # | |
Enum Day Source # | |
Eq Day Source # | |
Integral Day Source # | |
Data Day Source # | |
Num Day Source # | |
Ord Day Source # | |
Read Day Source # | |
Real Day Source # | |
Show Day Source # | |
Generic Day Source # | |
PrintfArg Day Source # | |
NFData Day Source # | |
Math (UnixDateTimeNanos Gregorian) Day Source # | |
Math (UnixDateTime Gregorian) Day Source # | |
Math (UnixDate Gregorian) Day Source # | |
Math (UTCDate Gregorian) Day Source # | |
type Rep Day Source # | |
data family DayOfWeek (cal :: Calendar) :: * Source #
Day of week.
Bounded (DayOfWeek Gregorian) Source # | |
Enum (DayOfWeek Gregorian) Source # | |
Eq (DayOfWeek Gregorian) Source # | |
Data (DayOfWeek Gregorian) Source # | |
Ord (DayOfWeek Gregorian) Source # | |
Read (DayOfWeek Gregorian) Source # | |
Show (DayOfWeek Gregorian) Source # | |
Generic (DayOfWeek Gregorian) Source # | |
NFData (DayOfWeek Gregorian) Source # | |
data DayOfWeek Gregorian Source # | |
type Rep (DayOfWeek Gregorian) Source # | |
Hour.
Bounded Hour Source # | |
Enum Hour Source # | |
Eq Hour Source # | |
Integral Hour Source # | |
Data Hour Source # | |
Num Hour Source # | |
Ord Hour Source # | |
Read Hour Source # | |
Real Hour Source # | |
Show Hour Source # | |
Generic Hour Source # | |
PrintfArg Hour Source # | |
NFData Hour Source # | |
Math (UnixDateTimeNanos Gregorian) Hour Source # | |
Math (UnixDateTime Gregorian) Hour Source # | |
type Rep Hour Source # | |
Minute.
Second.
Millisecond.
Microsecond.
Nanosecond.
Picosecond.
Structs
data DateStruct cal Source #
A struct with date components.
(Eq (Month cal), Eq (DayOfWeek cal)) => Eq (DateStruct cal) Source # | |
(Data (Month cal), Data (DayOfWeek cal), Typeable Calendar cal) => Data (DateStruct cal) Source # | |
(Show (Month cal), Show (DayOfWeek cal)) => Show (DateStruct cal) Source # | |
Generic (DateStruct cal) Source # | |
(NFData (Month cal), NFData (DayOfWeek cal)) => NFData (DateStruct cal) Source # | |
type Rep (DateStruct cal) Source # | |
data TimeStruct Source #
A struct with time components.
data DateTimeStruct cal Source #
A struct with date and time components.
(Eq (Month cal), Eq (DayOfWeek cal)) => Eq (DateTimeStruct cal) Source # | |
(Data (Month cal), Data (DayOfWeek cal), Typeable Calendar cal) => Data (DateTimeStruct cal) Source # | |
(Show (Month cal), Show (DayOfWeek cal)) => Show (DateTimeStruct cal) Source # | |
Generic (DateTimeStruct cal) Source # | |
(NFData (Month cal), NFData (DayOfWeek cal)) => NFData (DateTimeStruct cal) Source # | |
type Rep (DateTimeStruct cal) Source # | |
data LocalDateStruct cal Source #
A struct with date and time zone components.
(Eq (Month cal), Eq (DayOfWeek cal)) => Eq (LocalDateStruct cal) Source # | |
(Data (Month cal), Data (DayOfWeek cal), Typeable Calendar cal) => Data (LocalDateStruct cal) Source # | |
(Show (Month cal), Show (DayOfWeek cal)) => Show (LocalDateStruct cal) Source # | |
Generic (LocalDateStruct cal) Source # | |
(NFData (Month cal), NFData (DayOfWeek cal)) => NFData (LocalDateStruct cal) Source # | |
type Rep (LocalDateStruct cal) Source # | |
data LocalTimeStruct Source #
A struct with time and time zone components.
data LocalDateTimeStruct cal Source #
A struct with date, time, and time zone components.
(Eq (Month cal), Eq (DayOfWeek cal)) => Eq (LocalDateTimeStruct cal) Source # | |
(Data (Month cal), Data (DayOfWeek cal), Typeable Calendar cal) => Data (LocalDateTimeStruct cal) Source # | |
(Show (Month cal), Show (DayOfWeek cal)) => Show (LocalDateTimeStruct cal) Source # | |
Generic (LocalDateTimeStruct cal) Source # | |
(NFData (Month cal), NFData (DayOfWeek cal)) => NFData (LocalDateTimeStruct cal) Source # | |
type Rep (LocalDateTimeStruct cal) Source # | |
Fractions
properFracMillis :: RealFrac a => a -> (Second, Millis) Source #
Decompose a floating point number into second and millisecond components.
properFracMicros :: RealFrac a => a -> (Second, Micros) Source #
Decompose a floating point number into second and microsecond components.