Safe Haskell  Safe 

Language  Haskell2010 
Synopsis
 formatTime :: FormatTime t => TimeLocale > String > t > String
 type NumericPadOption = Maybe Char
 class FormatTime t where
 readsTime :: ParseTime t => TimeLocale > String > ReadS t
 readTime :: ParseTime t => TimeLocale > String > String > t
 parseTime :: ParseTime t => TimeLocale > String > String > Maybe t
 readPTime :: ParseTime t => Bool > TimeLocale > String > ReadP t
 readSTime :: ParseTime t => Bool > TimeLocale > String > ReadS t
 parseTimeOrError :: ParseTime t => Bool > TimeLocale > String > String > t
 parseTimeM :: (Monad m, ParseTime t) => Bool > TimeLocale > String > String > m t
 class ParseTime t where
 zonedTimeToUTC :: ZonedTime > UTCTime
 utcToZonedTime :: TimeZone > UTCTime > ZonedTime
 data ZonedTime = ZonedTime {}
 rfc822DateFormat :: String
 iso8601DateFormat :: Maybe String > String
 defaultTimeLocale :: TimeLocale
 data TimeLocale = TimeLocale {}
 localTimeToUT1 :: Rational > LocalTime > UniversalTime
 ut1ToLocalTime :: Rational > UniversalTime > LocalTime
 localTimeToUTC :: TimeZone > LocalTime > UTCTime
 utcToLocalTime :: TimeZone > UTCTime > LocalTime
 data LocalTime = LocalTime {}
 timeOfDayToDayFraction :: TimeOfDay > Rational
 dayFractionToTimeOfDay :: Rational > TimeOfDay
 timeOfDayToTime :: TimeOfDay > DiffTime
 timeToTimeOfDay :: DiffTime > TimeOfDay
 localToUTCTimeOfDay :: TimeZone > TimeOfDay > (Integer, TimeOfDay)
 utcToLocalTimeOfDay :: TimeZone > TimeOfDay > (Integer, TimeOfDay)
 makeTimeOfDayValid :: Int > Int > Pico > Maybe TimeOfDay
 midday :: TimeOfDay
 midnight :: TimeOfDay
 data TimeOfDay = TimeOfDay {}
 utc :: TimeZone
 timeZoneOffsetString :: TimeZone > String
 timeZoneOffsetString' :: Maybe Char > TimeZone > String
 hoursToTimeZone :: Int > TimeZone
 minutesToTimeZone :: Int > TimeZone
 data TimeZone = TimeZone {}
 diffUTCTime :: UTCTime > UTCTime > NominalDiffTime
 addUTCTime :: NominalDiffTime > UTCTime > UTCTime
 newtype UniversalTime = ModJulianDate {}
 data UTCTime = UTCTime {
 utctDay :: Day
 utctDayTime :: DiffTime
 getTime_resolution :: DiffTime
 nominalDay :: NominalDiffTime
 data NominalDiffTime
 diffTimeToPicoseconds :: DiffTime > Integer
 picosecondsToDiffTime :: Integer > DiffTime
 secondsToDiffTime :: Integer > DiffTime
 data DiffTime
 addGregorianYearsRollOver :: Integer > Day > Day
 addGregorianYearsClip :: Integer > Day > Day
 addGregorianMonthsRollOver :: Integer > Day > Day
 addGregorianMonthsClip :: Integer > Day > Day
 gregorianMonthLength :: Integer > Int > Int
 showGregorian :: Day > String
 fromGregorianValid :: Integer > Int > Int > Maybe Day
 fromGregorian :: Integer > Int > Int > Day
 toGregorian :: Day > (Integer, Int, Int)
 isLeapYear :: Integer > Bool
 diffDays :: Day > Day > Integer
 addDays :: Integer > Day > Day
 newtype Day = ModifiedJulianDay {}
 getCurrentTime :: MonadIO m => m UTCTime
 getTimeZone :: MonadIO m => UTCTime > m TimeZone
 getCurrentTimeZone :: MonadIO m => m TimeZone
 getZonedTime :: MonadIO m => m ZonedTime
 utcToLocalZonedTime :: MonadIO m => UTCTime > m ZonedTime
Documentation
formatTime :: FormatTime t => TimeLocale > String > t > String #
Substitute various timerelated information for each %code in the string, as per formatCharacter
.
The general form is %<modifier><width><specifier>
, where <modifier>
and <width>
are optional.
<modifier>
glibcstyle modifiers can be used before the specifier (here marked as z
):
%z
 no padding
%_z
 pad with spaces
%0z
 pad with zeros
%^z
 convert to upper case
%#z
 convert to lower case (consistently, unlike glibc)
<width>
Width digits can also be used after any modifiers and before the specifier (here marked as z
), for example:
%4z
 pad to 4 characters (with default padding character)
%_12z
 pad with spaces to 12 characters
<specifier>
For all types (note these three are done by formatTime
, not by formatCharacter
):
%%
%
%t
 tab
%n
 newline
TimeZone
For TimeZone
(and ZonedTime
and UTCTime
):
%z
 timezone offset in the format
HHMM
. %Z
 timezone name
LocalTime
For LocalTime
(and ZonedTime
and UTCTime
and UniversalTime
):
%c
 as
dateTimeFmt
locale
(e.g.%a %b %e %H:%M:%S %Z %Y
)
TimeOfDay
For TimeOfDay
(and LocalTime
and ZonedTime
and UTCTime
and UniversalTime
):
%R
 same as
%H:%M
%T
 same as
%H:%M:%S
%X
 as
timeFmt
locale
(e.g.%H:%M:%S
) %r
 as
time12Fmt
locale
(e.g.%I:%M:%S %p
) %P
 dayhalf of day from (
amPm
locale
), converted to lowercase,am
,pm
%p
 dayhalf of day from (
amPm
locale
),AM
,PM
%H
 hour of day (24hour), 0padded to two chars,
00
23
%k
 hour of day (24hour), spacepadded to two chars,
0
23
%I
 hour of dayhalf (12hour), 0padded to two chars,
01
12
%l
 hour of dayhalf (12hour), spacepadded to two chars,
1
12
%M
 minute of hour, 0padded to two chars,
00
59
%S
 second of minute (without decimal part), 0padded to two chars,
00
60
%q
 picosecond of second, 0padded to twelve chars,
000000000000
999999999999
. %Q
 decimal point and fraction of second, up to 12 second decimals, without trailing zeros.
For a whole number of seconds,
%Q
omits the decimal point unless padding is specified.
UTCTime
and ZonedTime
%s
 number of whole seconds since the Unix epoch. For times before
the Unix epoch, this is a negative number. Note that in
%s.%q
and%s%Q
the decimals are positive, not negative. For example, 0.9 seconds before the Unix epoch is formatted as1.1
with%s%Q
.
Day
For Day
(and LocalTime
and ZonedTime
and UTCTime
and UniversalTime
):
%D
 same as
%m/%d/%y
%F
 same as
%Y%m%d
%x
 as
dateFmt
locale
(e.g.%m/%d/%y
) %Y
 year, no padding. Note
%0Y
and%_Y
pad to four chars %y
 year of century, 0padded to two chars,
00
99
%C
 century, no padding. Note
%0C
and%_C
pad to two chars %B
 month name, long form (
fst
frommonths
locale
),January
December
%b
,%h
 month name, short form (
snd
frommonths
locale
),Jan
Dec
%m
 month of year, 0padded to two chars,
01
12
%d
 day of month, 0padded to two chars,
01
31
%e
 day of month, spacepadded to two chars,
1
31
%j
 day of year, 0padded to three chars,
001
366
%f
 century for Week Date format, no padding. Note
%0f
and%_f
pad to two chars %V
 week of year for Week Date format, 0padded to two chars,
01
53
%u
 day of week for Week Date format,
1
7
%a
 day of week, short form (
snd
fromwDays
locale
),Sun
Sat
%A
 day of week, long form (
fst
fromwDays
locale
),Sunday
Saturday
%U
 week of year where weeks start on Sunday (as
sundayStartWeek
), 0padded to two chars,00
53
%w
 day of week number,
0
(= Sunday) 6
(= Saturday) %W
 week of year where weeks start on Monday (as
mondayStartWeek
), 0padded to two chars,00
53
type NumericPadOption = Maybe Char #
class FormatTime t where #
formatCharacter :: Char > Maybe (TimeLocale > Maybe NumericPadOption > Maybe Int > t > String) #
Instances
:: ParseTime t  
=> TimeLocale  Time locale. 
> String  Format string. 
> String  Input string. 
> t  The time value. 
:: ParseTime t  
=> Bool  Accept leading whitespace? 
> TimeLocale  Time locale. 
> String  Format string 
> ReadP t 
Parse a time value given a format string. See parseTimeM
for details.
:: ParseTime t  
=> Bool  Accept leading whitespace? 
> TimeLocale  Time locale. 
> String  Format string 
> ReadS t 
Parse a time value given a format string. See parseTimeM
for details.
:: ParseTime t  
=> Bool  Accept leading and trailing whitespace? 
> TimeLocale  Time locale. 
> String  Format string. 
> String  Input string. 
> t  The time value. 
Parse a time value given a format string. Fails if the input could
not be parsed using the given format. See parseTimeM
for details.
:: (Monad m, ParseTime t)  
=> Bool  Accept leading and trailing whitespace? 
> TimeLocale  Time locale. 
> String  Format string. 
> String  Input string. 
> m t  Return the time value, or fail if the input could not be parsed using the given format. 
Parses a time value given a format string.
Supports the same %codes as formatTime
, including %
, %_
and %0
modifiers, however padding widths are not supported.
Case is not significant in the input string.
Some variations in the input are accepted:
%z
 accepts any of
HHMM
orHH:MM
. %Z
 accepts any string of letters, or any of the formats accepted by
%z
. %0Y
 accepts exactly four digits.
%0G
 accepts exactly four digits.
%0C
 accepts exactly two digits.
%0f
 accepts exactly two digits.
The class of types which can be parsed given a UNIXstyle time format string.
:: TimeLocale  The time locale. 
> [(Char, String)]  Pairs of format characters and the corresponding part of the input. 
> Maybe t 
Builds a time value from a parsed input string.
If the input does not include all the information needed to
construct a complete value, any missing parts should be taken
from 19700101 00:00:00 +0000 (which was a Thursday).
In the absence of %C
or %Y
, century is 1969  2068.
Instances
ParseTime ZonedTime  
Defined in Data.Time.Format.Parse  
ParseTime LocalTime  
Defined in Data.Time.Format.Parse  
ParseTime TimeOfDay  
Defined in Data.Time.Format.Parse  
ParseTime TimeZone  
Defined in Data.Time.Format.Parse  
ParseTime UniversalTime  
Defined in Data.Time.Format.Parse buildTime :: TimeLocale > [(Char, String)] > Maybe UniversalTime #  
ParseTime UTCTime  
Defined in Data.Time.Format.Parse  
ParseTime Day  
Defined in Data.Time.Format.Parse 
zonedTimeToUTC :: ZonedTime > UTCTime #
utcToZonedTime :: TimeZone > UTCTime > ZonedTime #
A local time together with a time zone.
Instances
Data ZonedTime  
Defined in Data.Time.LocalTime.Internal.ZonedTime gfoldl :: (forall d b. Data d => c (d > b) > d > c b) > (forall g. g > c g) > ZonedTime > c ZonedTime # gunfold :: (forall b r. Data b => c (b > r) > c r) > (forall r. r > c r) > Constr > c ZonedTime # toConstr :: ZonedTime > Constr # dataTypeOf :: ZonedTime > DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) > Maybe (c ZonedTime) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) > Maybe (c ZonedTime) # gmapT :: (forall b. Data b => b > b) > ZonedTime > ZonedTime # gmapQl :: (r > r' > r) > r > (forall d. Data d => d > r') > ZonedTime > r # gmapQr :: (r' > r > r) > r > (forall d. Data d => d > r') > ZonedTime > r # gmapQ :: (forall d. Data d => d > u) > ZonedTime > [u] # gmapQi :: Int > (forall d. Data d => d > u) > ZonedTime > u # gmapM :: Monad m => (forall d. Data d => d > m d) > ZonedTime > m ZonedTime # gmapMp :: MonadPlus m => (forall d. Data d => d > m d) > ZonedTime > m ZonedTime # gmapMo :: MonadPlus m => (forall d. Data d => d > m d) > ZonedTime > m ZonedTime #  
Show ZonedTime  
NFData ZonedTime  
Defined in Data.Time.LocalTime.Internal.ZonedTime  
FormatTime ZonedTime  
Defined in Data.Time.Format formatCharacter :: Char > Maybe (TimeLocale > Maybe NumericPadOption > Maybe Int > ZonedTime > String) #  
ParseTime ZonedTime  
Defined in Data.Time.Format.Parse 
Format string according to RFC822.
iso8601DateFormat :: Maybe String > String #
Construct format string according to ISO8601.
The Maybe String
argument allows to supply an optional time specification. E.g.:
iso8601DateFormat
Nothing == "%Y%m%d"  i.e.YYYYMMDD
iso8601DateFormat
(Just "%H:%M:%S") == "%Y%m%dT%H:%M:%S"  i.e.YYYYMMDDTHH:MM:SS
defaultTimeLocale :: TimeLocale #
Locale representing American usage.
knownTimeZones
contains only the ten timezones mentioned in RFC 822 sec. 5:
"UT", "GMT", "EST", "EDT", "CST", "CDT", "MST", "MDT", "PST", "PDT".
Note that the parsing functions will regardless parse singleletter military timezones and +HHMM format.
data TimeLocale #
TimeLocale  

Instances
Eq TimeLocale  
Defined in Data.Time.Format.Locale (==) :: TimeLocale > TimeLocale > Bool # (/=) :: TimeLocale > TimeLocale > Bool #  
Ord TimeLocale  
Defined in Data.Time.Format.Locale compare :: TimeLocale > TimeLocale > Ordering # (<) :: TimeLocale > TimeLocale > Bool # (<=) :: TimeLocale > TimeLocale > Bool # (>) :: TimeLocale > TimeLocale > Bool # (>=) :: TimeLocale > TimeLocale > Bool # max :: TimeLocale > TimeLocale > TimeLocale # min :: TimeLocale > TimeLocale > TimeLocale #  
Show TimeLocale  
Defined in Data.Time.Format.Locale showsPrec :: Int > TimeLocale > ShowS # show :: TimeLocale > String # showList :: [TimeLocale] > ShowS # 
localTimeToUT1 :: Rational > LocalTime > UniversalTime #
Get the UT1 time of a local time on a particular meridian (in degrees, positive is East).
ut1ToLocalTime :: Rational > UniversalTime > LocalTime #
Get the local time of a UT1 time on a particular meridian (in degrees, positive is East).
localTimeToUTC :: TimeZone > LocalTime > UTCTime #
Get the UTC time of a local time in a time zone.
utcToLocalTime :: TimeZone > UTCTime > LocalTime #
Get the local time of a UTC time in a time zone.
A simple day and time aggregate, where the day is of the specified parameter, and the time is a TimeOfDay. Conversion of this (as local civil time) to UTC depends on the time zone. Conversion of this (as local mean time) to UT1 depends on the longitude.
Instances
Eq LocalTime  
Data LocalTime  
Defined in Data.Time.LocalTime.Internal.LocalTime gfoldl :: (forall d b. Data d => c (d > b) > d > c b) > (forall g. g > c g) > LocalTime > c LocalTime # gunfold :: (forall b r. Data b => c (b > r) > c r) > (forall r. r > c r) > Constr > c LocalTime # toConstr :: LocalTime > Constr # dataTypeOf :: LocalTime > DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) > Maybe (c LocalTime) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) > Maybe (c LocalTime) # gmapT :: (forall b. Data b => b > b) > LocalTime > LocalTime # gmapQl :: (r > r' > r) > r > (forall d. Data d => d > r') > LocalTime > r # gmapQr :: (r' > r > r) > r > (forall d. Data d => d > r') > LocalTime > r # gmapQ :: (forall d. Data d => d > u) > LocalTime > [u] # gmapQi :: Int > (forall d. Data d => d > u) > LocalTime > u # gmapM :: Monad m => (forall d. Data d => d > m d) > LocalTime > m LocalTime # gmapMp :: MonadPlus m => (forall d. Data d => d > m d) > LocalTime > m LocalTime # gmapMo :: MonadPlus m => (forall d. Data d => d > m d) > LocalTime > m LocalTime #  
Ord LocalTime  
Defined in Data.Time.LocalTime.Internal.LocalTime  
Show LocalTime  
NFData LocalTime  
Defined in Data.Time.LocalTime.Internal.LocalTime  
FormatTime LocalTime  
Defined in Data.Time.Format formatCharacter :: Char > Maybe (TimeLocale > Maybe NumericPadOption > Maybe Int > LocalTime > String) #  
ParseTime LocalTime  
Defined in Data.Time.Format.Parse 
timeOfDayToDayFraction :: TimeOfDay > Rational #
Get the fraction of a day since midnight given a time of day.
dayFractionToTimeOfDay :: Rational > TimeOfDay #
Get the time of day given the fraction of a day since midnight.
timeOfDayToTime :: TimeOfDay > DiffTime #
Get the time since midnight for a given time of day.
timeToTimeOfDay :: DiffTime > TimeOfDay #
Get the time of day given a time since midnight. Time more than 24h will be converted to leapseconds.
localToUTCTimeOfDay :: TimeZone > TimeOfDay > (Integer, TimeOfDay) #
Convert a time of day in some timezone to a time of day in UTC, together with a day adjustment.
utcToLocalTimeOfDay :: TimeZone > TimeOfDay > (Integer, TimeOfDay) #
Convert a time of day in UTC to a time of day in some timezone, together with a day adjustment.
Time of day as represented in hour, minute and second (with picoseconds), typically used to express local time of day.
Instances
Eq TimeOfDay  
Data TimeOfDay  
Defined in Data.Time.LocalTime.Internal.TimeOfDay gfoldl :: (forall d b. Data d => c (d > b) > d > c b) > (forall g. g > c g) > TimeOfDay > c TimeOfDay # gunfold :: (forall b r. Data b => c (b > r) > c r) > (forall r. r > c r) > Constr > c TimeOfDay # toConstr :: TimeOfDay > Constr # dataTypeOf :: TimeOfDay > DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) > Maybe (c TimeOfDay) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) > Maybe (c TimeOfDay) # gmapT :: (forall b. Data b => b > b) > TimeOfDay > TimeOfDay # gmapQl :: (r > r' > r) > r > (forall d. Data d => d > r') > TimeOfDay > r # gmapQr :: (r' > r > r) > r > (forall d. Data d => d > r') > TimeOfDay > r # gmapQ :: (forall d. Data d => d > u) > TimeOfDay > [u] # gmapQi :: Int > (forall d. Data d => d > u) > TimeOfDay > u # gmapM :: Monad m => (forall d. Data d => d > m d) > TimeOfDay > m TimeOfDay # gmapMp :: MonadPlus m => (forall d. Data d => d > m d) > TimeOfDay > m TimeOfDay # gmapMo :: MonadPlus m => (forall d. Data d => d > m d) > TimeOfDay > m TimeOfDay #  
Ord TimeOfDay  
Defined in Data.Time.LocalTime.Internal.TimeOfDay  
Show TimeOfDay  
NFData TimeOfDay  
Defined in Data.Time.LocalTime.Internal.TimeOfDay  
FormatTime TimeOfDay  
Defined in Data.Time.Format formatCharacter :: Char > Maybe (TimeLocale > Maybe NumericPadOption > Maybe Int > TimeOfDay > String) #  
ParseTime TimeOfDay  
Defined in Data.Time.Format.Parse 
timeZoneOffsetString :: TimeZone > String #
Text representing the offset of this timezone, such as "0800" or "+0400" (like %z
in formatTime).
timeZoneOffsetString' :: Maybe Char > TimeZone > String #
Text representing the offset of this timezone, such as "0800" or "+0400" (like %z
in formatTime), with arbitrary padding.
hoursToTimeZone :: Int > TimeZone #
Create a nameless nonsummer timezone for this number of hours.
minutesToTimeZone :: Int > TimeZone #
Create a nameless nonsummer timezone for this number of minutes.
A TimeZone is a whole number of minutes offset from UTC, together with a name and a "just for summer" flag.
TimeZone  

Instances
Eq TimeZone  
Data TimeZone  
Defined in Data.Time.LocalTime.Internal.TimeZone gfoldl :: (forall d b. Data d => c (d > b) > d > c b) > (forall g. g > c g) > TimeZone > c TimeZone # gunfold :: (forall b r. Data b => c (b > r) > c r) > (forall r. r > c r) > Constr > c TimeZone # toConstr :: TimeZone > Constr # dataTypeOf :: TimeZone > DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) > Maybe (c TimeZone) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) > Maybe (c TimeZone) # gmapT :: (forall b. Data b => b > b) > TimeZone > TimeZone # gmapQl :: (r > r' > r) > r > (forall d. Data d => d > r') > TimeZone > r # gmapQr :: (r' > r > r) > r > (forall d. Data d => d > r') > TimeZone > r # gmapQ :: (forall d. Data d => d > u) > TimeZone > [u] # gmapQi :: Int > (forall d. Data d => d > u) > TimeZone > u # gmapM :: Monad m => (forall d. Data d => d > m d) > TimeZone > m TimeZone # gmapMp :: MonadPlus m => (forall d. Data d => d > m d) > TimeZone > m TimeZone # gmapMo :: MonadPlus m => (forall d. Data d => d > m d) > TimeZone > m TimeZone #  
Ord TimeZone  
Defined in Data.Time.LocalTime.Internal.TimeZone  
Show TimeZone  
NFData TimeZone  
Defined in Data.Time.LocalTime.Internal.TimeZone  
FormatTime TimeZone  
Defined in Data.Time.Format formatCharacter :: Char > Maybe (TimeLocale > Maybe NumericPadOption > Maybe Int > TimeZone > String) #  
ParseTime TimeZone  
Defined in Data.Time.Format.Parse 
diffUTCTime :: UTCTime > UTCTime > NominalDiffTime #
diffUTCTime a b = a  b
addUTCTime :: NominalDiffTime > UTCTime > UTCTime #
addUTCTime a b = a + b
newtype UniversalTime #
The Modified Julian Date is the day with the fraction of the day, measured from UT midnight. It's used to represent UT1, which is time as measured by the earth's rotation, adjusted for various wobbles.
Instances
This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.
UTCTime  

Instances
Eq UTCTime  
Data UTCTime  
Defined in Data.Time.Clock.Internal.UTCTime gfoldl :: (forall d b. Data d => c (d > b) > d > c b) > (forall g. g > c g) > UTCTime > c UTCTime # gunfold :: (forall b r. Data b => c (b > r) > c r) > (forall r. r > c r) > Constr > c UTCTime # toConstr :: UTCTime > Constr # dataTypeOf :: UTCTime > DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) > Maybe (c UTCTime) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) > Maybe (c UTCTime) # gmapT :: (forall b. Data b => b > b) > UTCTime > UTCTime # gmapQl :: (r > r' > r) > r > (forall d. Data d => d > r') > UTCTime > r # gmapQr :: (r' > r > r) > r > (forall d. Data d => d > r') > UTCTime > r # gmapQ :: (forall d. Data d => d > u) > UTCTime > [u] # gmapQi :: Int > (forall d. Data d => d > u) > UTCTime > u # gmapM :: Monad m => (forall d. Data d => d > m d) > UTCTime > m UTCTime # gmapMp :: MonadPlus m => (forall d. Data d => d > m d) > UTCTime > m UTCTime # gmapMo :: MonadPlus m => (forall d. Data d => d > m d) > UTCTime > m UTCTime #  
Ord UTCTime  
Defined in Data.Time.Clock.Internal.UTCTime  
NFData UTCTime  
Defined in Data.Time.Clock.Internal.UTCTime  
FormatTime UTCTime  
Defined in Data.Time.Format formatCharacter :: Char > Maybe (TimeLocale > Maybe NumericPadOption > Maybe Int > UTCTime > String) #  
ParseTime UTCTime  
Defined in Data.Time.Format.Parse 
getTime_resolution :: DiffTime #
The resolution of getSystemTime
, getCurrentTime
, getPOSIXTime
nominalDay :: NominalDiffTime #
One day in NominalDiffTime
.
data NominalDiffTime #
This is a length of time, as measured by UTC. Conversion functions will treat it as seconds. It has a precision of 10^12 s. It ignores leapseconds, so it's not necessarily a fixed amount of clock time. For instance, 23:00 UTC + 2 hours of NominalDiffTime = 01:00 UTC (+ 1 day), regardless of whether a leapsecond intervened.
Instances
diffTimeToPicoseconds :: DiffTime > Integer #
Get the number of picoseconds in a DiffTime
.
picosecondsToDiffTime :: Integer > DiffTime #
Create a DiffTime
from a number of picoseconds.
secondsToDiffTime :: Integer > DiffTime #
Create a DiffTime
which represents an integral number of seconds.
This is a length of time, as measured by a clock. Conversion functions will treat it as seconds. It has a precision of 10^12 s.
Instances
Enum DiffTime  
Defined in Data.Time.Clock.Internal.DiffTime  
Eq DiffTime  
Fractional DiffTime  
Data DiffTime  
Defined in Data.Time.Clock.Internal.DiffTime gfoldl :: (forall d b. Data d => c (d > b) > d > c b) > (forall g. g > c g) > DiffTime > c DiffTime # gunfold :: (forall b r. Data b => c (b > r) > c r) > (forall r. r > c r) > Constr > c DiffTime # toConstr :: DiffTime > Constr # dataTypeOf :: DiffTime > DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) > Maybe (c DiffTime) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) > Maybe (c DiffTime) # gmapT :: (forall b. Data b => b > b) > DiffTime > DiffTime # gmapQl :: (r > r' > r) > r > (forall d. Data d => d > r') > DiffTime > r # gmapQr :: (r' > r > r) > r > (forall d. Data d => d > r') > DiffTime > r # gmapQ :: (forall d. Data d => d > u) > DiffTime > [u] # gmapQi :: Int > (forall d. Data d => d > u) > DiffTime > u # gmapM :: Monad m => (forall d. Data d => d > m d) > DiffTime > m DiffTime # gmapMp :: MonadPlus m => (forall d. Data d => d > m d) > DiffTime > m DiffTime # gmapMo :: MonadPlus m => (forall d. Data d => d > m d) > DiffTime > m DiffTime #  
Num DiffTime  
Ord DiffTime  
Defined in Data.Time.Clock.Internal.DiffTime  
Real DiffTime  
Defined in Data.Time.Clock.Internal.DiffTime toRational :: DiffTime > Rational #  
RealFrac DiffTime  
Show DiffTime  
NFData DiffTime  
Defined in Data.Time.Clock.Internal.DiffTime 
addGregorianYearsRollOver :: Integer > Day > Day #
Add years, matching month and day, with Feb 29th rolled over to Mar 1st if necessary. For instance, 20040229 + 2 years = 20060301.
addGregorianYearsClip :: Integer > Day > Day #
Add years, matching month and day, with Feb 29th clipped to Feb 28th if necessary. For instance, 20040229 + 2 years = 20060228.
addGregorianMonthsRollOver :: Integer > Day > Day #
Add months, with days past the last day of the month rolling over to the next month. For instance, 20050130 + 1 month = 20050302.
addGregorianMonthsClip :: Integer > Day > Day #
Add months, with days past the last day of the month clipped to the last day. For instance, 20050130 + 1 month = 20050228.
gregorianMonthLength :: Integer > Int > Int #
The number of days in a given month according to the proleptic Gregorian calendar. First argument is year, second is month.
showGregorian :: Day > String #
Show in ISO 8601 format (yyyymmdd)
fromGregorianValid :: Integer > Int > Int > Maybe Day #
Convert from proleptic Gregorian calendar. First argument is year, second month number (112), third day (131). Invalid values will return Nothing
fromGregorian :: Integer > Int > Int > Day #
Convert from proleptic Gregorian calendar. First argument is year, second month number (112), third day (131). Invalid values will be clipped to the correct range, month first, then day.
toGregorian :: Day > (Integer, Int, Int) #
Convert to proleptic Gregorian calendar. First element of result is year, second month number (112), third day (131).
isLeapYear :: Integer > Bool #
Is this year a leap year according to the proleptic Gregorian calendar?
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 :: (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  
FormatTime Day  
Defined in Data.Time.Format formatCharacter :: Char > Maybe (TimeLocale > Maybe NumericPadOption > Maybe Int > Day > String) #  
ParseTime Day  
Defined in Data.Time.Format.Parse 
getCurrentTime :: MonadIO m => m UTCTime Source #
getCurrentTimeZone :: MonadIO m => m TimeZone Source #
getZonedTime :: MonadIO m => m ZonedTime Source #