Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data DatePart a = DatePart {}
- data DatePartSmall
- toSpan :: DatePartSmall -> DatePartSmall
- negate :: DatePartSmall -> DatePartSmall
- isNegative :: DatePartSmall -> Bool
- data ErrorDetail
- data UTCTimeBin = UTCTimeBin {}
- data Tz a = Tz TimeZone a
- class Tz' tz where
- data TimeSpan a
- type TwoInt a b = (Integral a, Integral b)
DatePart
serializeable structure for essential Date, Time parts
may also be used to construct UTCTime
see Data.Time.Hora.Part for conversion between UTCTime
and DatePart
Instances
DatePartSmall
data DatePartSmall Source #
DatePartSmall
uses fixed-size storage. Storage (as encoded with Data.Binary.encode) varies with the constructor used, is noted as ".. bytes" against each constructor.
allows to operate with dates only ..
.. or time (minute / millisecond precision) only
is convenient for dealing with intervals / timespans
day count begins at 1 Jan 0001: 1 Jan 0001 is day 1
max date is: 11759222-01-19. That's 19 Jan 11759222
see Data.Time.Hora.Part for conversion between UTCTime
and DatePartSmall
only values constructed with DatePartSmall
can be converted to UTCTime
Day Word32 | days after 31 Dec 1 BC: 1 Jan AD 1 is day 1. See https://en.wikipedia.org/wiki/Anno_Domini 5 bytes |
Min Word16 | minutes (includes hours) 3 bytes |
Ms Word32 | milliseconds (includes seconds) 5 bytes |
Time Word16 Word32 | minutes, milliseconds 7 bytes |
DatePartSmall Word32 Word16 Word32 | date, minutes, milliseconds 11 bytes |
Day' Word32 | date span in days 5 bytes |
Min' Word16 | time span in minutes 3 bytes |
Ms' Word32 | time span in milliseconds 5 bytes |
Error ErrorDetail | result of failed operation |
Instances
toSpan :: DatePartSmall -> DatePartSmall Source #
negate :: DatePartSmall -> DatePartSmall Source #
isNegative :: DatePartSmall -> Bool Source #
checks if DatePartSmall
is a negative span
data ErrorDetail Source #
Invalid | operation is not possible with these constructors |
Overflow | data type maxed out |
Invalid_Overflow |
Instances
UTCTimeBin
data UTCTimeBin Source #
UTCTimeBin
closely mimicks UTCTime
without loss of precision
UTCTimeBin
has Binary
instance. The only purpose of UTCTimeBin
is to offer faster conversion from / to UTCTime
and more compact serialization compared with DatePart
.
see Data.Time.Hora.Part for conversion between UTCTime
and UTCTimeBin
UTCTimeBin | |
|
Instances
Tz
Tz
(DatePart
a) parts show local date & time
for conversions between timezones see Data.Time.Hora.Zone
Instances
Functor Tz Source # | |
Eq a => Eq (Tz a) Source # | |
Ord a => Ord (Tz a) Source # | |
Show a => Show (Tz a) Source # | |
Integral a => ToUTC (Tz (DatePart a)) Source # | |
Timestamp (Tz String) Source # | local timezone |
Integral a => Now (Tz (DatePart a)) Source # | local timezone
|
Instances
Tz' TimeZone Source # | |
Tz' TimeZoneSeries Source # | see Data.Time.Hora.Zone re: use of |
Defined in Data.Time.Hora.Type |
TimeSpan
second and fractions
see Data.Time.Hora.Span for conversion
Instances
Functor TimeSpan Source # | |
(Eq a, Integral a) => Eq (TimeSpan a) # |
|
Integral a => Num (TimeSpan a) # | ! fromInteger returns
|
Defined in Data.Time.Hora.Type | |
(Ord a, Integral a) => Ord (TimeSpan a) # |
|
Show a => Show (TimeSpan a) Source # | |
Orphan instances
(Eq a, Integral a) => Eq (TimeSpan a) Source # |
|
Integral a => Num (TimeSpan a) Source # | ! fromInteger returns
|
(Ord a, Integral a) => Ord (TimeSpan a) Source # |
|