-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A time library -- -- A time library @package time @version 1.4 module Data.Time.Calendar.MonthDay -- | convert month and day in the Gregorian or Julian calendars to day of -- year. First arg is leap year flag monthAndDayToDayOfYear :: Bool -> Int -> Int -> Int -- | convert month and day in the Gregorian or Julian calendars to day of -- year. 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 -- day. First arg is leap year flag dayOfYearToMonthAndDay :: Bool -> Int -> (Int, Int) -- | the length of a given month in the Gregorian or Julian calendars. -- First arg is leap year flag monthLength :: Bool -> Int -> Int -- | ISO 8601 Ordinal Date format module Data.Time.Calendar.OrdinalDate -- | convert to ISO 8601 Ordinal Date format. First element of result is -- year (proleptic Gregoran calendar), second is the day of the year, -- with 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 -- clipped to the correct range (1 to 365 or 366). fromOrdinalDate :: Integer -> Int -> Day -- | convert from ISO 8601 Ordinal Date format. Invalid day numbers return -- Nothing 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 -- calendar? isLeapYear :: Integer -> Bool -- | Get the number of the Monday-starting week in the year and the day of -- the week. The first Monday is the first day of week 1, any earlier -- days in the year are week 0 (as "%W" in <a>formatTime</a>). Monday is -- 1, Sunday is 7 (as "%u" in <a>formatTime</a>). mondayStartWeek :: Day -> (Int, Int) -- | Get the number of the Sunday-starting week in the year and the day of -- the week. The first Sunday is the first day of week 1, any earlier -- days in the year are week 0 (as "%U" in <a>formatTime</a>). Sunday is -- 0, Saturday is 6 (as "%w" in <a>formatTime</a>). sundayStartWeek :: Day -> (Int, Int) -- | The inverse of <a>mondayStartWeek</a>. Get a <a>Day</a> given the -- year, the number of the Monday-starting week, and the day of the week. -- The first Monday is the first day of week 1, any earlier days in the -- year are week 0 (as "%W" 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 -- and the number of the day of a Sunday-starting week. The first Sunday -- is the first day of week 1, any earlier days in the year are week 0 -- (as "%U" in <a>formatTime</a>). fromSundayStartWeek :: Integer -> Int -> Int -> Day fromSundayStartWeekValid :: Integer -> Int -> Int -> Maybe Day -- | ISO 8601 Week Date format module Data.Time.Calendar.WeekDate -- | convert to ISO 8601 Week Date format. First element of result is year, -- second week number (1-53), third day of week (1 for Monday to 7 for -- Sunday). Note that "Week" years are not quite the same as Gregorian -- years, as the first day of the year is always a Monday. The first week -- of a year is the first week to contain at least four days in the -- corresponding Gregorian year. toWeekDate :: Day -> (Integer, Int, Int) -- | convert from ISO 8601 Week Date format. First argument is year, second -- week number (1-52 or 53), third day of week (1 for Monday to 7 for -- Sunday). Invalid week and day values will be clipped to the correct -- range. fromWeekDate :: Integer -> Int -> Int -> Day -- | convert from ISO 8601 Week Date format. First argument is year, second -- week number (1-52 or 53), third day of week (1 for Monday to 7 for -- Sunday). 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 module Data.Time.Calendar.Julian -- | convert to proleptic Julian year and day format. First element of -- result is year (proleptic Julian calendar), second is the day of the -- year, 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 -- will 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 -- will 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, -- second month number (1-12), third day (1-31). toJulian :: Day -> (Integer, Int, Int) -- | convert from proleptic Julian calendar. First argument is year, second -- month number (1-12), third day (1-31). Invalid values will be clipped -- to the correct range, month first, then day. fromJulian :: Integer -> Int -> Int -> Day -- | convert from proleptic Julian calendar. First argument is year, second -- month number (1-12), third day (1-31). Invalid values will return -- Nothing. 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 -- calendar. 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 -- last 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 -- the 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 -- if 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 -- 1st if necessary. For instance, 2004-02-29 + 2 years = 2006-03-01. addJulianYearsRollOver :: Integer -> Day -> Day -- | POSIX time, if you need to deal with timestamps and the like. Most -- people 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 -- -- To convert from a <a>CTime</a> or <a>EpochTime</a>, use -- <a>realToFrac</a>. type POSIXTime = NominalDiffTime posixSecondsToUTCTime :: POSIXTime -> UTCTime utcTimeToPOSIXSeconds :: UTCTime -> POSIXTime -- | Get the current POSIX time from the system clock. getPOSIXTime :: IO POSIXTime -- | Types and functions for UTC and UT1 module Data.Time.Clock -- | 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. newtype UniversalTime ModJulianDate :: Rational -> UniversalTime getModJulianDate :: UniversalTime -> Rational -- | 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. data DiffTime -- | Create a <a>DiffTime</a> which represents an integral number of -- seconds. secondsToDiffTime :: Integer -> DiffTime -- | Create a <a>DiffTime</a> from a number of picoseconds. picosecondsToDiffTime :: Integer -> DiffTime -- | 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. data UTCTime UTCTime :: Day -> DiffTime -> UTCTime -- | the day utctDay :: UTCTime -> Day -- | the time from midnight, 0 <= t < 86401s (because of -- leap-seconds) utctDayTime :: UTCTime -> DiffTime -- | 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 -- leap-seconds, 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 leap-second intervened. data NominalDiffTime -- | addUTCTime a b = a + b addUTCTime :: NominalDiffTime -> UTCTime -> UTCTime -- | diffUTCTime a b = a - b diffUTCTime :: UTCTime -> UTCTime -> NominalDiffTime -- | Get the current UTC time from the system clock. getCurrentTime :: IO UTCTime module Data.Time.Calendar -- | The Modified Julian Day is a standard count of days, with zero being -- the 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 -- year, second month number (1-12), third day (1-31). toGregorian :: Day -> (Integer, Int, Int) -- | convert from proleptic Gregorian calendar. First argument is year, -- second month number (1-12), third day (1-31). Invalid values will be -- clipped to the correct range, month first, then day. fromGregorian :: Integer -> Int -> Int -> Day -- | convert from proleptic Gregorian calendar. First argument is year, -- second month number (1-12), third day (1-31). Invalid values will -- return 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 -- Gregorian 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 -- last 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 -- the 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 -- if 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 -- 1st 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 -- calendar? 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 -- Christian 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 -- method gregorianPaschalMoon :: Integer -> Day -- | Given a year, find Easter according to the Gregorian method gregorianEaster :: Integer -> Day module Data.Time.LocalTime -- | A TimeZone is a whole number of minutes offset from UTC, together with -- a 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 -- be 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 -- "+0400" (like %z in formatTime) timeZoneOffsetString :: TimeZone -> String -- | Text representing the offset of this timezone, such as "-0800" or -- "+0400" (like %z in formatTime), with arbitrary padding timeZoneOffsetString' :: NumericPadOption -> 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 -- adjustments) getTimeZone :: UTCTime -> IO TimeZone -- | Get the current time-zone getCurrentTimeZone :: IO TimeZone -- | Time of day as represented in hour, minute and second (with -- picoseconds), 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 <= todSec < 61, accomodating leap seconds. Any local -- minute may have a leap second, since leap seconds happen in all zones -- simultaneously todSec :: TimeOfDay -> Pico -- | Hour zero midnight :: TimeOfDay -- | Hour twelve midday :: TimeOfDay makeTimeOfDayValid :: Int -> Int -> Pico -> Maybe TimeOfDay -- | Convert a ToD in UTC to a ToD in some timezone, together with a day -- adjustment. utcToLocalTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay) -- | Convert a ToD in some timezone to a ToD in UTC, together with a day -- adjustment. localToUTCTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay) -- | Get a TimeOfDay given a time since midnight. Time more than 24h will -- be converted to leap-seconds. timeToTimeOfDay :: DiffTime -> TimeOfDay -- | Find out how much time since midnight a given TimeOfDay is. timeOfDayToTime :: TimeOfDay -> DiffTime -- | Get a TimeOfDay given the fraction of a day since midnight. dayFractionToTimeOfDay :: Rational -> TimeOfDay -- | Get the fraction of a day since midnight given a TimeOfDay. timeOfDayToDayFraction :: TimeOfDay -> Rational -- | 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. data LocalTime LocalTime :: Day -> TimeOfDay -> LocalTime localDay :: LocalTime -> Day localTimeOfDay :: LocalTime -> TimeOfDay -- | show a UTC time in a given time zone as a LocalTime utcToLocalTime :: TimeZone -> UTCTime -> LocalTime -- | find out what UTC time a given LocalTime in a given time zone is localTimeToUTC :: TimeZone -> LocalTime -> UTCTime -- | 1st arg is observation meridian in degrees, positive is East ut1ToLocalTime :: Rational -> UniversalTime -> LocalTime -- | 1st arg is observation meridian in degrees, positive is East localTimeToUT1 :: Rational -> LocalTime -> UniversalTime -- | A local time together with a TimeZone. 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 -- | TAI and leap-second tables for converting to UTC: most people won't -- need this 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 -- | TAI - UTC during this day. No table is provided, as any program -- compiled with it would become out of date in six months. type LeapSecondTable = Day -> Integer utcDayLength :: LeapSecondTable -> Day -> DiffTime utcToTAITime :: LeapSecondTable -> UTCTime -> AbsoluteTime taiToUTCTime :: LeapSecondTable -> AbsoluteTime -> UTCTime -- | Parse the contents of a tai-utc.dat file. This does not do any kind of -- validation and will return a bad table for input not in the correct -- format. parseTAIUTCDATFile :: String -> LeapSecondTable instance Eq AbsoluteTime instance Ord AbsoluteTime instance Data AbsoluteTime instance Show AbsoluteTime instance Typeable AbsoluteTime instance NFData AbsoluteTime module Data.Time.Format type NumericPadOption = Maybe Char class FormatTime t formatCharacter :: FormatTime t => Char -> Maybe (TimeLocale -> Maybe NumericPadOption -> t -> String) -- | Substitute various time-related information for each %-code in the -- string, as per <a>formatCharacter</a>. -- -- For all types (note these three are done here, not by -- <a>formatCharacter</a>): -- -- <ul> -- <li><i><tt>%%</tt></i> <tt>%</tt></li> -- <li><i><tt>%t</tt></i> tab</li> -- <li><i><tt>%n</tt></i> newline</li> -- </ul> -- -- glibc-style modifiers can be used before the letter (here marked as -- <tt>z</tt>): -- -- <ul> -- <li><i><tt>%-z</tt></i> no padding</li> -- <li><i><tt>%_z</tt></i> pad with spaces</li> -- <li><i><tt>%0z</tt></i> pad with zeros</li> -- <li><i><tt>%^z</tt></i> convert to upper case</li> -- <li><i><tt>%#z</tt></i> convert to lower case (consistently, unlike -- glibc)</li> -- </ul> -- -- For <a>TimeZone</a> (and <a>ZonedTime</a> and <a>UTCTime</a>): -- -- <ul> -- <li><i><tt>%z</tt></i> timezone offset in the format -- <tt>-HHMM</tt>.</li> -- <li><i><tt>%Z</tt></i> timezone name</li> -- </ul> -- -- For <a>LocalTime</a> (and <a>ZonedTime</a> and <a>UTCTime</a>): -- -- <ul> -- <li><i><tt>%c</tt></i> as <a>dateTimeFmt</a> <tt>locale</tt> (e.g. -- <tt>%a %b %e %H:%M:%S %Z %Y</tt>)</li> -- </ul> -- -- For <a>TimeOfDay</a> (and <a>LocalTime</a> and <a>ZonedTime</a> and -- <a>UTCTime</a>): -- -- <ul> -- <li><i><tt>%R</tt></i> same as <tt>%H:%M</tt></li> -- <li><i><tt>%T</tt></i> same as <tt>%H:%M:%S</tt></li> -- <li><i><tt>%X</tt></i> as <a>timeFmt</a> <tt>locale</tt> (e.g. -- <tt>%H:%M:%S</tt>)</li> -- <li><i><tt>%r</tt></i> as <a>time12Fmt</a> <tt>locale</tt> (e.g. -- <tt>%I:%M:%S %p</tt>)</li> -- <li><i><tt>%P</tt></i> day half from (<a>amPm</a> <tt>locale</tt>), -- converted to lowercase, <tt>am</tt>, <tt>pm</tt></li> -- <li><i><tt>%p</tt></i> day half from (<a>amPm</a> <tt>locale</tt>), -- <tt>AM</tt>, <tt>PM</tt></li> -- <li><i><tt>%H</tt></i> hour, 24-hour, leading 0 as needed, <tt>00</tt> -- - <tt>23</tt></li> -- <li><i><tt>%I</tt></i> hour, 12-hour, leading 0 as needed, <tt>01</tt> -- - <tt>12</tt></li> -- <li><i><tt>%k</tt></i> hour, 24-hour, leading space as needed, <tt> -- 0</tt> - <tt>23</tt></li> -- <li><i><tt>%l</tt></i> hour, 12-hour, leading space as needed, <tt> -- 1</tt> - <tt>12</tt></li> -- <li><i><tt>%M</tt></i> minute, <tt>00</tt> - <tt>59</tt></li> -- <li><i><tt>%S</tt></i> second, without decimal part, <tt>00</tt> - -- <tt>60</tt></li> -- <li><i><tt>%q</tt></i> picosecond, including trailing zeros, -- <tt>000000000000</tt> - <tt>999999999999</tt>.</li> -- <li><i><tt>%Q</tt></i> decimal point and up to 12 second decimals, -- without trailing zeros. For a whole number of seconds, <tt>%Q</tt> -- produces the empty string.</li> -- </ul> -- -- For <a>UTCTime</a> and <a>ZonedTime</a>: -- -- <ul> -- <li><i><tt>%s</tt></i> number of whole seconds since the Unix epoch. -- For times before the Unix epoch, this is a negative number. Note that -- in <tt>%s.%q</tt> and <tt>%s%Q</tt> the decimals are positive, not -- negative. For example, 0.9 seconds before the Unix epoch is formatted -- as <tt>-1.1</tt> with <tt>%s%Q</tt>.</li> -- </ul> -- -- For <a>Day</a> (and <a>LocalTime</a> and <a>ZonedTime</a> and -- <a>UTCTime</a>): -- -- <ul> -- <li><i><tt>%D</tt></i> same as <tt>%m/%d/%y</tt></li> -- <li><i><tt>%F</tt></i> same as <tt>%Y-%m-%d</tt></li> -- <li><i><tt>%x</tt></i> as <a>dateFmt</a> <tt>locale</tt> (e.g. -- <tt>%m/%d/%y</tt>)</li> -- <li><i><tt>%Y</tt></i> year</li> -- <li><i><tt>%y</tt></i> last two digits of year, <tt>00</tt> - -- <tt>99</tt></li> -- <li><i><tt>%C</tt></i> century (being the first two digits of the -- year), <tt>00</tt> - <tt>99</tt></li> -- <li><i><tt>%B</tt></i> month name, long form (<a>fst</a> from -- <a>months</a> <tt>locale</tt>), <tt>January</tt> - -- <tt>December</tt></li> -- <li><i><tt>%b</tt>, <tt>%h</tt></i> month name, short form (<a>snd</a> -- from <a>months</a> <tt>locale</tt>), <tt>Jan</tt> - <tt>Dec</tt></li> -- <li><i><tt>%m</tt></i> month of year, leading 0 as needed, <tt>01</tt> -- - <tt>12</tt></li> -- <li><i><tt>%d</tt></i> day of month, leading 0 as needed, <tt>01</tt> -- - <tt>31</tt></li> -- <li><i><tt>%e</tt></i> day of month, leading space as needed, <tt> -- 1</tt> - <tt>31</tt></li> -- <li><i><tt>%j</tt></i> day of year for Ordinal Date format, -- <tt>001</tt> - <tt>366</tt></li> -- <li><i><tt>%G</tt></i> year for Week Date format</li> -- <li><i><tt>%g</tt></i> last two digits of year for Week Date format, -- <tt>00</tt> - <tt>99</tt></li> -- <li><i><tt>%f</tt></i> century (first two digits of year) for Week -- Date format, <tt>00</tt> - <tt>99</tt></li> -- <li><i><tt>%V</tt></i> week for Week Date format, <tt>01</tt> - -- <tt>53</tt></li> -- <li><i><tt>%u</tt></i> day for Week Date format, <tt>1</tt> - -- <tt>7</tt></li> -- <li><i><tt>%a</tt></i> day of week, short form (<a>snd</a> from -- <a>wDays</a> <tt>locale</tt>), <tt>Sun</tt> - <tt>Sat</tt></li> -- <li><i><tt>%A</tt></i> day of week, long form (<a>fst</a> from -- <a>wDays</a> <tt>locale</tt>), <tt>Sunday</tt> - -- <tt>Saturday</tt></li> -- <li><i><tt>%U</tt></i> week number of year, where weeks start on -- Sunday (as <a>sundayStartWeek</a>), <tt>00</tt> - <tt>53</tt></li> -- <li><i><tt>%w</tt></i> day of week number, <tt>0</tt> (= Sunday) - -- <tt>6</tt> (= Saturday)</li> -- <li><i><tt>%W</tt></i> week number of year, where weeks start on -- Monday (as <a>mondayStartWeek</a>), <tt>00</tt> - <tt>53</tt></li> -- </ul> formatTime :: FormatTime t => TimeLocale -> String -> t -> String -- | Parses a time value given a format string. Supports the same %-codes -- as <tt>formatTime</tt>, including <tt>%-</tt>, <tt>%_</tt> and -- <tt>%0</tt> modifiers. Leading and trailing whitespace is accepted. -- Case is not significant. Some variations in the input are accepted: -- -- <ul> -- <li><i><tt>%z</tt></i> accepts any of <tt>-HHMM</tt> or -- <tt>-HH:MM</tt>.</li> -- <li><i><tt>%Z</tt></i> accepts any string of letters, or any of the -- formats accepted by <tt>%z</tt>.</li> -- </ul> parseTime :: ParseTime t => TimeLocale -> String -> String -> Maybe t -- | Parse a time value given a format string. Fails if the input could not -- be parsed using the given format. See <a>parseTime</a> for details. readTime :: ParseTime t => TimeLocale -> String -> String -> t -- | Parse a time value given a format string. See <a>parseTime</a> for -- details. readsTime :: ParseTime t => TimeLocale -> String -> ReadS t -- | The class of types which can be parsed given a UNIX-style time format -- string. class ParseTime t buildTime :: ParseTime t => TimeLocale -> [(Char, String)] -> t instance FormatTime UTCTime instance FormatTime Day instance FormatTime TimeZone instance FormatTime ZonedTime instance FormatTime TimeOfDay instance FormatTime LocalTime module Data.Time