-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A time library
gr
grA time library
@package time
@version 1.8.0.2


-- | ISO 8601 Ordinal Date format
module Data.Time.Calendar.OrdinalDate

-- | Convert to ISO 8601 Ordinal Date format. First element of result is
gryear (proleptic Gregoran calendar), second is the day of the year,
grwith 1 for Jan 1, and 365 (or 366 in leap years) for Dec 31.
toOrdinalDate :: Day -> (Integer, Int)

-- | Convert from ISO 8601 Ordinal Date format. Invalid day numbers will be
grclipped to the correct range (1 to 365 or 366).
fromOrdinalDate :: Integer -> Int -> Day

-- | Convert from ISO 8601 Ordinal Date format. Invalid day numbers return
gr<a>Nothing</a>
fromOrdinalDateValid :: Integer -> Int -> Maybe Day

-- | Show in ISO 8601 Ordinal Date format (yyyy-ddd)
showOrdinalDate :: Day -> String

-- | Is this year a leap year according to the proleptic Gregorian
grcalendar?
isLeapYear :: Integer -> Bool

-- | Get the number of the Monday-starting week in the year and the day of
grthe week. The first Monday is the first day of week 1, any earlier
grdays in the year are week 0 (as <tt>%W</tt> in <a>formatTime</a>).
grMonday is 1, Sunday is 7 (as <tt>%u</tt> in <a>formatTime</a>).
mondayStartWeek :: Day -> (Int, Int)

-- | Get the number of the Sunday-starting week in the year and the day of
grthe week. The first Sunday is the first day of week 1, any earlier
grdays in the year are week 0 (as <tt>%U</tt> in <a>formatTime</a>).
grSunday is 0, Saturday is 6 (as <tt>%w</tt> in <a>formatTime</a>).
sundayStartWeek :: Day -> (Int, Int)

-- | The inverse of <a>mondayStartWeek</a>. Get a <a>Day</a> given the
gryear, the number of the Monday-starting week, and the day of the week.
grThe first Monday is the first day of week 1, any earlier days in the
gryear are week 0 (as <tt>%W</tt> in <a>formatTime</a>).
fromMondayStartWeek :: Integer -> Int -> Int -> Day
fromMondayStartWeekValid :: Integer -> Int -> Int -> Maybe Day

-- | The inverse of <a>sundayStartWeek</a>. Get a <a>Day</a> given the year
grand the number of the day of a Sunday-starting week. The first Sunday
gris the first day of week 1, any earlier days in the year are week 0
gr(as <tt>%U</tt> in <a>formatTime</a>).
fromSundayStartWeek :: Integer -> Int -> Int -> Day
fromSundayStartWeekValid :: Integer -> Int -> Int -> Maybe Day

module Data.Time.Calendar.MonthDay

-- | Convert month and day in the Gregorian or Julian calendars to day of
gryear. First arg is leap year flag.
monthAndDayToDayOfYear :: Bool -> Int -> Int -> Int

-- | Convert month and day in the Gregorian or Julian calendars to day of
gryear. First arg is leap year flag.
monthAndDayToDayOfYearValid :: Bool -> Int -> Int -> Maybe Int

-- | Convert day of year in the Gregorian or Julian calendars to month and
grday. First arg is leap year flag.
dayOfYearToMonthAndDay :: Bool -> Int -> (Int, Int)

-- | The length of a given month in the Gregorian or Julian calendars.
grFirst arg is leap year flag.
monthLength :: Bool -> Int -> Int

module Data.Time.Calendar.Julian

-- | Convert to proleptic Julian year and day format. First element of
grresult is year (proleptic Julian calendar), second is the day of the
gryear, with 1 for Jan 1, and 365 (or 366 in leap years) for Dec 31.
toJulianYearAndDay :: Day -> (Integer, Int)

-- | Convert from proleptic Julian year and day format. Invalid day numbers
grwill be clipped to the correct range (1 to 365 or 366).
fromJulianYearAndDay :: Integer -> Int -> Day

-- | Convert from proleptic Julian year and day format. Invalid day numbers
grwill return Nothing
fromJulianYearAndDayValid :: Integer -> Int -> Maybe Day

-- | Show in proleptic Julian year and day format (yyyy-ddd)
showJulianYearAndDay :: Day -> String

-- | Is this year a leap year according to the proleptic Julian calendar?
isJulianLeapYear :: Integer -> Bool

-- | Convert to proleptic Julian calendar. First element of result is year,
grsecond month number (1-12), third day (1-31).
toJulian :: Day -> (Integer, Int, Int)

-- | Convert from proleptic Julian calendar. First argument is year, second
grmonth number (1-12), third day (1-31). Invalid values will be clipped
grto the correct range, month first, then day.
fromJulian :: Integer -> Int -> Int -> Day

-- | Convert from proleptic Julian calendar. First argument is year, second
grmonth number (1-12), third day (1-31). Invalid values will return
grNothing.
fromJulianValid :: Integer -> Int -> Int -> Maybe Day

-- | Show in ISO 8601 format (yyyy-mm-dd)
showJulian :: Day -> String

-- | The number of days in a given month according to the proleptic Julian
grcalendar. First argument is year, second is month.
julianMonthLength :: Integer -> Int -> Int

-- | Add months, with days past the last day of the month clipped to the
grlast day. For instance, 2005-01-30 + 1 month = 2005-02-28.
addJulianMonthsClip :: Integer -> Day -> Day

-- | Add months, with days past the last day of the month rolling over to
grthe next month. For instance, 2005-01-30 + 1 month = 2005-03-02.
addJulianMonthsRollOver :: Integer -> Day -> Day

-- | Add years, matching month and day, with Feb 29th clipped to Feb 28th
grif necessary. For instance, 2004-02-29 + 2 years = 2006-02-28.
addJulianYearsClip :: Integer -> Day -> Day

-- | Add years, matching month and day, with Feb 29th rolled over to Mar
gr1st if necessary. For instance, 2004-02-29 + 2 years = 2006-03-01.
addJulianYearsRollOver :: Integer -> Day -> Day


-- | ISO 8601 Week Date format
module Data.Time.Calendar.WeekDate

-- | Convert to ISO 8601 Week Date format. First element of result is year,
grsecond week number (1-53), third day of week (1 for Monday to 7 for
grSunday). Note that "Week" years are not quite the same as Gregorian
gryears, as the first day of the year is always a Monday. The first week
grof a year is the first week to contain at least four days in the
grcorresponding Gregorian year.
toWeekDate :: Day -> (Integer, Int, Int)

-- | Convert from ISO 8601 Week Date format. First argument is year, second
grweek number (1-52 or 53), third day of week (1 for Monday to 7 for
grSunday). Invalid week and day values will be clipped to the correct
grrange.
fromWeekDate :: Integer -> Int -> Int -> Day

-- | Convert from ISO 8601 Week Date format. First argument is year, second
grweek number (1-52 or 53), third day of week (1 for Monday to 7 for
grSunday). Invalid week and day values will return Nothing.
fromWeekDateValid :: Integer -> Int -> Int -> Maybe Day

-- | Show in ISO 8601 Week Date format as yyyy-Www-d (e.g. "2006-W46-3").
showWeekDate :: Day -> String


-- | Fast access to the system clock.
module Data.Time.Clock.System

-- | The day of the epoch of <a>SystemTime</a>, 1970-01-01
systemEpochDay :: Day

-- | <a>SystemTime</a> is time returned by system clock functions. Its
grsemantics depends on the clock function, but the epoch is typically
grthe beginning of 1970. Note that <a>systemNanoseconds</a> of 1E9 to
gr2E9-1 can be used to represent leap seconds.
data SystemTime
MkSystemTime :: {-# UNPACK #-} !Int64 -> {-# UNPACK #-} !Word32 -> SystemTime
[systemSeconds] :: SystemTime -> {-# UNPACK #-} !Int64
[systemNanoseconds] :: SystemTime -> {-# UNPACK #-} !Word32

-- | Map leap-second values to the start of the following second. The
grresulting <a>systemNanoseconds</a> will always be in the range 0 to
gr1E9-1.
truncateSystemTimeLeapSecond :: SystemTime -> SystemTime

-- | Get the system time, epoch start of 1970 UTC, leap-seconds ignored.
gr<a>getSystemTime</a> is typically much faster than
gr<tt>getCurrentTime</tt>.
getSystemTime :: IO SystemTime

-- | Convert <a>SystemTime</a> to <a>UTCTime</a>, matching zero
gr<a>SystemTime</a> to midnight of <a>systemEpochDay</a> UTC.
systemToUTCTime :: SystemTime -> UTCTime

-- | Convert <a>UTCTime</a> to <a>SystemTime</a>, matching zero
gr<a>SystemTime</a> to midnight of <a>systemEpochDay</a> UTC.
utcToSystemTime :: UTCTime -> SystemTime

-- | Convert <a>SystemTime</a> to <a>AbsoluteTime</a>, matching zero
gr<a>SystemTime</a> to midnight of <a>systemEpochDay</a> TAI.
systemToTAITime :: SystemTime -> AbsoluteTime


-- | POSIX time, if you need to deal with timestamps and the like. Most
grpeople won't need this module.
module Data.Time.Clock.POSIX

-- | 86400 nominal seconds in every day
posixDayLength :: NominalDiffTime

-- | POSIX time is the nominal time since 1970-01-01 00:00 UTC
gr
grTo convert from a <a>CTime</a> or <a>EpochTime</a>, use
gr<a>realToFrac</a>.
type POSIXTime = NominalDiffTime
posixSecondsToUTCTime :: POSIXTime -> UTCTime
utcTimeToPOSIXSeconds :: UTCTime -> POSIXTime

-- | Get the current POSIX time from the system clock.
getPOSIXTime :: IO POSIXTime

-- | Get the current <a>UTCTime</a> from the system clock.
getCurrentTime :: IO UTCTime
systemToPOSIXTime :: SystemTime -> POSIXTime

module Data.Time.Format
type NumericPadOption = Maybe Char
class FormatTime t
formatCharacter :: FormatTime t => Char -> Maybe (TimeLocale -> Maybe NumericPadOption -> Maybe Int -> t -> String)

-- | Substitute various time-related information for each %-code in the
grstring, as per <a>formatCharacter</a>.
gr
grThe general form is
gr<tt>%&lt;modifier&gt;&lt;width&gt;&lt;specifier&gt;</tt>, where
gr<tt>&lt;modifier&gt;</tt> and <tt>&lt;width&gt;</tt> are optional.
gr
gr<h2><tt>&lt;modifier&gt;</tt></h2>
gr
grglibc-style modifiers can be used before the specifier (here marked as
gr<tt>z</tt>):
gr
gr<ul>
gr<li><i><tt>%-z</tt></i> no padding</li>
gr<li><i><tt>%_z</tt></i> pad with spaces</li>
gr<li><i><tt>%0z</tt></i> pad with zeros</li>
gr<li><i><tt>%^z</tt></i> convert to upper case</li>
gr<li><i><tt>%#z</tt></i> convert to lower case (consistently, unlike
grglibc)</li>
gr</ul>
gr
gr<h2><tt>&lt;width&gt;</tt></h2>
gr
grWidth digits can also be used after any modifiers and before the
grspecifier (here marked as <tt>z</tt>), for example:
gr
gr<ul>
gr<li><i><tt>%4z</tt></i> pad to 4 characters (with default padding
grcharacter)</li>
gr<li><i><tt>%_12z</tt></i> pad with spaces to 12 characters</li>
gr</ul>
gr
gr<h2><tt>&lt;specifier&gt;</tt></h2>
gr
grFor all types (note these three are done by <a>formatTime</a>, not by
gr<a>formatCharacter</a>):
gr
gr<ul>
gr<li><i><tt>%%</tt></i> <tt>%</tt></li>
gr<li><i><tt>%t</tt></i> tab</li>
gr<li><i><tt>%n</tt></i> newline</li>
gr</ul>
gr
gr<h3><a>TimeZone</a></h3>
gr
grFor <a>TimeZone</a> (and <a>ZonedTime</a> and <a>UTCTime</a>):
gr
gr<ul>
gr<li><i><tt>%z</tt></i> timezone offset in the format
gr<tt>-HHMM</tt>.</li>
gr<li><i><tt>%Z</tt></i> timezone name</li>
gr</ul>
gr
gr<h3><a>LocalTime</a></h3>
gr
grFor <a>LocalTime</a> (and <a>ZonedTime</a> and <a>UTCTime</a> and
gr<a>UniversalTime</a>):
gr
gr<ul>
gr<li><i><tt>%c</tt></i> as <a>dateTimeFmt</a> <tt>locale</tt> (e.g.
gr<tt>%a %b %e %H:%M:%S %Z %Y</tt>)</li>
gr</ul>
gr
gr<h3><a>TimeOfDay</a></h3>
gr
grFor <a>TimeOfDay</a> (and <a>LocalTime</a> and <a>ZonedTime</a> and
gr<a>UTCTime</a> and <a>UniversalTime</a>):
gr
gr<ul>
gr<li><i><tt>%R</tt></i> same as <tt>%H:%M</tt></li>
gr<li><i><tt>%T</tt></i> same as <tt>%H:%M:%S</tt></li>
gr<li><i><tt>%X</tt></i> as <a>timeFmt</a> <tt>locale</tt> (e.g.
gr<tt>%H:%M:%S</tt>)</li>
gr<li><i><tt>%r</tt></i> as <a>time12Fmt</a> <tt>locale</tt> (e.g.
gr<tt>%I:%M:%S %p</tt>)</li>
gr<li><i><tt>%P</tt></i> day-half of day from (<a>amPm</a>
gr<tt>locale</tt>), converted to lowercase, <tt>am</tt>,
gr<tt>pm</tt></li>
gr<li><i><tt>%p</tt></i> day-half of day from (<a>amPm</a>
gr<tt>locale</tt>), <tt>AM</tt>, <tt>PM</tt></li>
gr<li><i><tt>%H</tt></i> hour of day (24-hour), 0-padded to two chars,
gr<tt>00</tt> - <tt>23</tt></li>
gr<li><i><tt>%k</tt></i> hour of day (24-hour), space-padded to two
grchars, <tt> 0</tt> - <tt>23</tt></li>
gr<li><i><tt>%I</tt></i> hour of day-half (12-hour), 0-padded to two
grchars, <tt>01</tt> - <tt>12</tt></li>
gr<li><i><tt>%l</tt></i> hour of day-half (12-hour), space-padded to two
grchars, <tt> 1</tt> - <tt>12</tt></li>
gr<li><i><tt>%M</tt></i> minute of hour, 0-padded to two chars,
gr<tt>00</tt> - <tt>59</tt></li>
gr<li><i><tt>%S</tt></i> second of minute (without decimal part),
gr0-padded to two chars, <tt>00</tt> - <tt>60</tt></li>
gr<li><i><tt>%q</tt></i> picosecond of second, 0-padded to twelve chars,
gr<tt>000000000000</tt> - <tt>999999999999</tt>.</li>
gr<li><i><tt>%Q</tt></i> decimal point and fraction of second, up to 12
grsecond decimals, without trailing zeros. For a whole number of
grseconds, <tt>%Q</tt> omits the decimal point unless padding is
grspecified.</li>
gr</ul>
gr
gr<h3><a>UTCTime</a> and <a>ZonedTime</a></h3>
gr
grFor <a>UTCTime</a> and <a>ZonedTime</a>:
gr
gr<ul>
gr<li><i><tt>%s</tt></i> number of whole seconds since the Unix epoch.
grFor times before the Unix epoch, this is a negative number. Note that
grin <tt>%s.%q</tt> and <tt>%s%Q</tt> the decimals are positive, not
grnegative. For example, 0.9 seconds before the Unix epoch is formatted
gras <tt>-1.1</tt> with <tt>%s%Q</tt>.</li>
gr</ul>
gr
gr<h3><a>Day</a></h3>
gr
grFor <a>Day</a> (and <a>LocalTime</a> and <a>ZonedTime</a> and
gr<a>UTCTime</a> and <a>UniversalTime</a>):
gr
gr<ul>
gr<li><i><tt>%D</tt></i> same as <tt>%m/%d/%y</tt></li>
gr<li><i><tt>%F</tt></i> same as <tt>%Y-%m-%d</tt></li>
gr<li><i><tt>%x</tt></i> as <a>dateFmt</a> <tt>locale</tt> (e.g.
gr<tt>%m/%d/%y</tt>)</li>
gr<li><i><tt>%Y</tt></i> year, no padding. Note <tt>%0Y</tt> and
gr<tt>%_Y</tt> pad to four chars</li>
gr<li><i><tt>%y</tt></i> year of century, 0-padded to two chars,
gr<tt>00</tt> - <tt>99</tt></li>
gr<li><i><tt>%C</tt></i> century, no padding. Note <tt>%0C</tt> and
gr<tt>%_C</tt> pad to two chars</li>
gr<li><i><tt>%B</tt></i> month name, long form (<a>fst</a> from
gr<a>months</a> <tt>locale</tt>), <tt>January</tt> -
gr<tt>December</tt></li>
gr<li><i><tt>%b</tt>, <tt>%h</tt></i> month name, short form (<a>snd</a>
grfrom <a>months</a> <tt>locale</tt>), <tt>Jan</tt> - <tt>Dec</tt></li>
gr<li><i><tt>%m</tt></i> month of year, 0-padded to two chars,
gr<tt>01</tt> - <tt>12</tt></li>
gr<li><i><tt>%d</tt></i> day of month, 0-padded to two chars,
gr<tt>01</tt> - <tt>31</tt></li>
gr<li><i><tt>%e</tt></i> day of month, space-padded to two chars, <tt>
gr1</tt> - <tt>31</tt></li>
gr<li><i><tt>%j</tt></i> day of year, 0-padded to three chars,
gr<tt>001</tt> - <tt>366</tt></li>
gr<li><i><tt>%f</tt></i> century for Week Date format, no padding. Note
gr<tt>%0f</tt> and <tt>%_f</tt> pad to two chars</li>
gr<li><i><tt>%V</tt></i> week of year for Week Date format, 0-padded to
grtwo chars, <tt>01</tt> - <tt>53</tt></li>
gr<li><i><tt>%u</tt></i> day of week for Week Date format, <tt>1</tt> -
gr<tt>7</tt></li>
gr<li><i><tt>%a</tt></i> day of week, short form (<a>snd</a> from
gr<a>wDays</a> <tt>locale</tt>), <tt>Sun</tt> - <tt>Sat</tt></li>
gr<li><i><tt>%A</tt></i> day of week, long form (<a>fst</a> from
gr<a>wDays</a> <tt>locale</tt>), <tt>Sunday</tt> -
gr<tt>Saturday</tt></li>
gr<li><i><tt>%U</tt></i> week of year where weeks start on Sunday (as
gr<a>sundayStartWeek</a>), 0-padded to two chars, <tt>00</tt> -
gr<tt>53</tt></li>
gr<li><i><tt>%w</tt></i> day of week number, <tt>0</tt> (= Sunday) -
gr<tt>6</tt> (= Saturday)</li>
gr<li><i><tt>%W</tt></i> week of year where weeks start on Monday (as
gr<a>mondayStartWeek</a>), 0-padded to two chars, <tt>00</tt> -
gr<tt>53</tt></li>
gr</ul>
formatTime :: (FormatTime t) => TimeLocale -> String -> t -> String

-- | Parses a time value given a format string. Supports the same %-codes
gras <tt>formatTime</tt>, including <tt>%-</tt>, <tt>%_</tt> and
gr<tt>%0</tt> modifiers, however padding widths are not supported. Case
gris not significant in the input string. Some variations in the input
grare accepted:
gr
gr<ul>
gr<li><i><tt>%z</tt></i> accepts any of <tt>-HHMM</tt> or
gr<tt>-HH:MM</tt>.</li>
gr<li><i><tt>%Z</tt></i> accepts any string of letters, or any of the
grformats accepted by <tt>%z</tt>.</li>
gr<li><i><tt>%0Y</tt></i> accepts exactly four digits.</li>
gr<li><i><tt>%0G</tt></i> accepts exactly four digits.</li>
gr<li><i><tt>%0C</tt></i> accepts exactly two digits.</li>
gr<li><i><tt>%0f</tt></i> accepts exactly two digits.</li>
gr</ul>
parseTimeM :: (Monad m, ParseTime t) => Bool -> TimeLocale -> String -> String -> m t

-- | Parse a time value given a format string. Fails if the input could not
grbe parsed using the given format. See <a>parseTimeM</a> for details.
parseTimeOrError :: ParseTime t => Bool -> TimeLocale -> String -> String -> t

-- | Parse a time value given a format string. See <a>parseTimeM</a> for
grdetails.
readSTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadS t

-- | Parse a time value given a format string. See <a>parseTimeM</a> for
grdetails.
readPTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadP t

-- | <i>Deprecated: use "parseTimeM True" instead</i>
parseTime :: ParseTime t => TimeLocale -> String -> String -> Maybe t

-- | <i>Deprecated: use "parseTimeOrError True" instead</i>
readTime :: ParseTime t => TimeLocale -> String -> String -> t

-- | <i>Deprecated: use "readSTime True" instead</i>
readsTime :: ParseTime t => TimeLocale -> String -> ReadS t

-- | The class of types which can be parsed given a UNIX-style time format
grstring.
class ParseTime t

-- | Builds a time value from a parsed input string. If the input does not
grinclude all the information needed to construct a complete value, any
grmissing parts should be taken from 1970-01-01 00:00:00 +0000 (which
grwas a Thursday). In the absence of <tt>%C</tt> or <tt>%Y</tt>, century
gris 1969 - 2068.
buildTime :: ParseTime t => TimeLocale -> [(Char, String)] -> Maybe t
data TimeLocale
TimeLocale :: [(String, String)] -> [(String, String)] -> (String, String) -> String -> [TimeZone] -> TimeLocale

-- | full and abbreviated week days, starting with Sunday
[wDays] :: TimeLocale -> [(String, String)]

-- | full and abbreviated months
[months] :: TimeLocale -> [(String, String)]

-- | AM/PM symbols
[amPm] :: TimeLocale -> (String, String)

-- | formatting strings

-- | formatting strings

-- | formatting strings

-- | formatting strings
[dateTimeFmt, dateFmt, timeFmt, time12Fmt] :: TimeLocale -> String

-- | time zones known by name
[knownTimeZones] :: TimeLocale -> [TimeZone]

-- | Locale representing American usage.
gr
gr<a>knownTimeZones</a> contains only the ten time-zones mentioned in
grRFC 822 sec. 5: "UT", "GMT", "EST", "EDT", "CST", "CDT", "MST", "MDT",
gr"PST", "PDT". Note that the parsing functions will regardless parse
grsingle-letter military time-zones and +HHMM format.
defaultTimeLocale :: TimeLocale

-- | Construct format string according to <a>ISO-8601</a>.
gr
grThe <tt>Maybe String</tt> argument allows to supply an optional time
grspecification. E.g.:
gr
gr<pre>
gr<a>iso8601DateFormat</a> Nothing            == "%Y-%m-%d"           -- i.e. <tt><i>YYYY-MM-DD</i></tt>
gr<a>iso8601DateFormat</a> (Just "%H:%M:%S")  == "%Y-%m-%dT%H:%M:%S"  -- i.e. <tt><i>YYYY-MM-DD</i>T<i>HH:MM:SS</i></tt>
gr</pre>
iso8601DateFormat :: Maybe String -> String

-- | Format string according to <a>RFC822</a>.
rfc822DateFormat :: String
instance Data.Time.Format.FormatTime Data.Time.LocalTime.Internal.LocalTime.LocalTime
instance Data.Time.Format.FormatTime Data.Time.LocalTime.Internal.TimeOfDay.TimeOfDay
instance Data.Time.Format.FormatTime Data.Time.LocalTime.Internal.ZonedTime.ZonedTime
instance Data.Time.Format.FormatTime Data.Time.LocalTime.Internal.TimeZone.TimeZone
instance Data.Time.Format.FormatTime Data.Time.Calendar.Days.Day
instance Data.Time.Format.FormatTime Data.Time.Clock.Internal.UTCTime.UTCTime
instance Data.Time.Format.FormatTime Data.Time.Clock.Internal.UniversalTime.UniversalTime

module Data.Time.LocalTime

-- | A TimeZone is a whole number of minutes offset from UTC, together with
gra name and a "just for summer" flag.
data TimeZone
TimeZone :: Int -> Bool -> String -> TimeZone

-- | The number of minutes offset from UTC. Positive means local time will
grbe later in the day than UTC.
[timeZoneMinutes] :: TimeZone -> Int

-- | Is this time zone just persisting for the summer?
[timeZoneSummerOnly] :: TimeZone -> Bool

-- | The name of the zone, typically a three- or four-letter acronym.
[timeZoneName] :: TimeZone -> String

-- | Text representing the offset of this timezone, such as "-0800" or
gr"+0400" (like <tt>%z</tt> in formatTime).
timeZoneOffsetString :: TimeZone -> String

-- | Text representing the offset of this timezone, such as "-0800" or
gr"+0400" (like <tt>%z</tt> in formatTime), with arbitrary padding.
timeZoneOffsetString' :: Maybe Char -> TimeZone -> String

-- | Create a nameless non-summer timezone for this number of minutes.
minutesToTimeZone :: Int -> TimeZone

-- | Create a nameless non-summer timezone for this number of hours.
hoursToTimeZone :: Int -> TimeZone

-- | The UTC time zone.
utc :: TimeZone

-- | Get the local time-zone for a given time (varying as per summertime
gradjustments).
getTimeZone :: UTCTime -> IO TimeZone

-- | Get the current time-zone.
getCurrentTimeZone :: IO TimeZone

-- | Time of day as represented in hour, minute and second (with
grpicoseconds), typically used to express local time of day.
data TimeOfDay
TimeOfDay :: Int -> Int -> Pico -> TimeOfDay

-- | range 0 - 23
[todHour] :: TimeOfDay -> Int

-- | range 0 - 59
[todMin] :: TimeOfDay -> Int

-- | Note that 0 &lt;= <a>todSec</a> &lt; 61, accomodating leap seconds.
grAny local minute may have a leap second, since leap seconds happen in
grall zones simultaneously
[todSec] :: TimeOfDay -> Pico

-- | Hour zero
midnight :: TimeOfDay

-- | Hour twelve
midday :: TimeOfDay
makeTimeOfDayValid :: Int -> Int -> Pico -> Maybe TimeOfDay

-- | Convert a time of day in UTC to a time of day in some timezone,
grtogether with a day adjustment.
utcToLocalTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay)

-- | Convert a time of day in some timezone to a time of day in UTC,
grtogether with a day adjustment.
localToUTCTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay)

-- | Get the time of day given a time since midnight. Time more than 24h
grwill be converted to leap-seconds.
timeToTimeOfDay :: DiffTime -> TimeOfDay

-- | Get the time since midnight for a given time of day.
timeOfDayToTime :: TimeOfDay -> DiffTime

-- | Get the time of day given the fraction of a day since midnight.
dayFractionToTimeOfDay :: Rational -> TimeOfDay

-- | Get the fraction of a day since midnight given a time of day.
timeOfDayToDayFraction :: TimeOfDay -> Rational

-- | A simple day and time aggregate, where the day is of the specified
grparameter, and the time is a TimeOfDay. Conversion of this (as local
grcivil time) to UTC depends on the time zone. Conversion of this (as
grlocal mean time) to UT1 depends on the longitude.
data LocalTime
LocalTime :: Day -> TimeOfDay -> LocalTime
[localDay] :: LocalTime -> Day
[localTimeOfDay] :: LocalTime -> TimeOfDay

-- | Get the local time of a UTC time in a time zone.
utcToLocalTime :: TimeZone -> UTCTime -> LocalTime

-- | Get the UTC time of a local time in a time zone.
localTimeToUTC :: TimeZone -> LocalTime -> UTCTime

-- | Get the local time of a UT1 time on a particular meridian (in degrees,
grpositive is East).
ut1ToLocalTime :: Rational -> UniversalTime -> LocalTime

-- | Get the UT1 time of a local time on a particular meridian (in degrees,
grpositive is East).
localTimeToUT1 :: Rational -> LocalTime -> UniversalTime

-- | A local time together with a time zone.
data ZonedTime
ZonedTime :: LocalTime -> TimeZone -> ZonedTime
[zonedTimeToLocalTime] :: ZonedTime -> LocalTime
[zonedTimeZone] :: ZonedTime -> TimeZone
utcToZonedTime :: TimeZone -> UTCTime -> ZonedTime
zonedTimeToUTC :: ZonedTime -> UTCTime
getZonedTime :: IO ZonedTime
utcToLocalZonedTime :: UTCTime -> IO ZonedTime


-- | Types and functions for UTC and UT1
module Data.Time.Clock

-- | The Modified Julian Date is the day with the fraction of the day,
grmeasured from UT midnight. It's used to represent UT1, which is time
gras measured by the earth's rotation, adjusted for various wobbles.
newtype UniversalTime
ModJulianDate :: Rational -> UniversalTime
[getModJulianDate] :: UniversalTime -> Rational

-- | This is a length of time, as measured by a clock. Conversion functions
grwill treat it as seconds. It has a precision of 10^-12 s.
data DiffTime

-- | Create a <a>DiffTime</a> which represents an integral number of
grseconds.
secondsToDiffTime :: Integer -> DiffTime

-- | Create a <a>DiffTime</a> from a number of picoseconds.
picosecondsToDiffTime :: Integer -> DiffTime

-- | Get the number of picoseconds in a <a>DiffTime</a>.
diffTimeToPicoseconds :: DiffTime -> Integer

-- | This is the simplest representation of UTC. It consists of the day
grnumber, and a time offset from midnight. Note that if a day has a leap
grsecond added to it, it will have 86401 seconds.
data UTCTime
UTCTime :: Day -> DiffTime -> UTCTime

-- | the day
[utctDay] :: UTCTime -> Day

-- | the time from midnight, 0 &lt;= t &lt; 86401s (because of
grleap-seconds)
[utctDayTime] :: UTCTime -> DiffTime

-- | This is a length of time, as measured by UTC. Conversion functions
grwill treat it as seconds. It has a precision of 10^-12 s. It ignores
grleap-seconds, so it's not necessarily a fixed amount of clock time.
grFor instance, 23:00 UTC + 2 hours of NominalDiffTime = 01:00 UTC (+ 1
grday), regardless of whether a leap-second intervened.
data NominalDiffTime

-- | One day in <a>NominalDiffTime</a>.
nominalDay :: NominalDiffTime

-- | addUTCTime a b = a + b
addUTCTime :: NominalDiffTime -> UTCTime -> UTCTime

-- | diffUTCTime a b = a - b
diffUTCTime :: UTCTime -> UTCTime -> NominalDiffTime

-- | Get the current <a>UTCTime</a> from the system clock.
getCurrentTime :: IO UTCTime

-- | The resolution of <a>getSystemTime</a>, <tt>getCurrentTime</tt>,
gr<tt>getPOSIXTime</tt>
getTime_resolution :: DiffTime


-- | TAI and leap-second maps for converting to UTC: most people won't need
grthis module.
module Data.Time.Clock.TAI

-- | AbsoluteTime is TAI, time as measured by a clock.
data AbsoluteTime

-- | The epoch of TAI, which is 1858-11-17 00:00:00 TAI.
taiEpoch :: AbsoluteTime

-- | addAbsoluteTime a b = a + b
addAbsoluteTime :: DiffTime -> AbsoluteTime -> AbsoluteTime

-- | diffAbsoluteTime a b = a - b
diffAbsoluteTime :: AbsoluteTime -> AbsoluteTime -> DiffTime
taiNominalDayStart :: Day -> AbsoluteTime

-- | TAI - UTC during this day. No table is provided, as any program
grcompiled with it would become out of date in six months.
type LeapSecondMap = Day -> Maybe Int
utcDayLength :: LeapSecondMap -> Day -> Maybe DiffTime
utcToTAITime :: LeapSecondMap -> UTCTime -> Maybe AbsoluteTime
taiToUTCTime :: LeapSecondMap -> AbsoluteTime -> Maybe UTCTime

-- | TAI clock, if it exists. Note that it is unlikely to be set correctly,
grwithout due care and attention.
taiClock :: Maybe (DiffTime, IO AbsoluteTime)
instance GHC.Show.Show Data.Time.Clock.Internal.AbsoluteTime.AbsoluteTime

module Data.Time.Calendar

-- | The Modified Julian Day is a standard count of days, with zero being
grthe day 1858-11-17.
newtype Day
ModifiedJulianDay :: Integer -> Day
[toModifiedJulianDay] :: Day -> Integer
addDays :: Integer -> Day -> Day
diffDays :: Day -> Day -> Integer

-- | Convert to proleptic Gregorian calendar. First element of result is
gryear, second month number (1-12), third day (1-31).
toGregorian :: Day -> (Integer, Int, Int)

-- | Convert from proleptic Gregorian calendar. First argument is year,
grsecond month number (1-12), third day (1-31). Invalid values will be
grclipped to the correct range, month first, then day.
fromGregorian :: Integer -> Int -> Int -> Day

-- | Convert from proleptic Gregorian calendar. First argument is year,
grsecond month number (1-12), third day (1-31). Invalid values will
grreturn Nothing
fromGregorianValid :: Integer -> Int -> Int -> Maybe Day

-- | Show in ISO 8601 format (yyyy-mm-dd)
showGregorian :: Day -> String

-- | The number of days in a given month according to the proleptic
grGregorian calendar. First argument is year, second is month.
gregorianMonthLength :: Integer -> Int -> Int

-- | Add months, with days past the last day of the month clipped to the
grlast day. For instance, 2005-01-30 + 1 month = 2005-02-28.
addGregorianMonthsClip :: Integer -> Day -> Day

-- | Add months, with days past the last day of the month rolling over to
grthe next month. For instance, 2005-01-30 + 1 month = 2005-03-02.
addGregorianMonthsRollOver :: Integer -> Day -> Day

-- | Add years, matching month and day, with Feb 29th clipped to Feb 28th
grif necessary. For instance, 2004-02-29 + 2 years = 2006-02-28.
addGregorianYearsClip :: Integer -> Day -> Day

-- | Add years, matching month and day, with Feb 29th rolled over to Mar
gr1st if necessary. For instance, 2004-02-29 + 2 years = 2006-03-01.
addGregorianYearsRollOver :: Integer -> Day -> Day

-- | Is this year a leap year according to the proleptic Gregorian
grcalendar?
isLeapYear :: Integer -> Bool

module Data.Time.Calendar.Easter

-- | The next Sunday strictly after a given day.
sundayAfter :: Day -> Day

-- | Given a year, find the Paschal full moon according to Orthodox
grChristian tradition
orthodoxPaschalMoon :: Integer -> Day

-- | Given a year, find Easter according to Orthodox Christian tradition
orthodoxEaster :: Integer -> Day

-- | Given a year, find the Paschal full moon according to the Gregorian
grmethod
gregorianPaschalMoon :: Integer -> Day

-- | Given a year, find Easter according to the Gregorian method
gregorianEaster :: Integer -> Day

module Data.Time
