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

-- | Time library
--   
--   This package provides the old time library.
--   
--   For new projects, the newer time library is recommended.
@package old-time
@version 1.1.0.3

-- | The standard time library from Haskell 98. This library is deprecated,
--   please look at Data.Time in the time package
--   instead.
--   
--   System.Time provides functionality for clock times, including
--   timezone information (i.e, the functionality of "time.h",
--   adapted to the Haskell environment). It follows RFC 1129 in its use of
--   Coordinated Universal Time (UTC).
module System.Time

-- | A representation of the internal clock time. Clock times may be
--   compared, converted to strings, or converted to an external calendar
--   time CalendarTime for I/O or other manipulations.
data ClockTime

-- | Construct a clock time. The arguments are a number of seconds since
--   00:00:00 (UTC) on 1 January 1970, and an additional number of
--   picoseconds.
--   
--   In Haskell 98, the ClockTime type is abstract.
TOD :: Integer -> Integer -> ClockTime
getClockTime :: IO ClockTime

-- | records the difference between two clock times in a user-readable way.
data TimeDiff
TimeDiff :: Int -> Int -> Int -> Int -> Int -> Int -> Integer -> TimeDiff
[tdYear] :: TimeDiff -> Int
[tdMonth] :: TimeDiff -> Int
[tdDay] :: TimeDiff -> Int
[tdHour] :: TimeDiff -> Int
[tdMin] :: TimeDiff -> Int
[tdSec] :: TimeDiff -> Int
[tdPicosec] :: TimeDiff -> Integer

-- | null time difference.
noTimeDiff :: TimeDiff

-- | diffClockTimes t1 t2 returns the difference between
--   two clock times t1 and t2 as a TimeDiff.
diffClockTimes :: ClockTime -> ClockTime -> TimeDiff

-- | addToClockTime d t adds a time difference d
--   and a clock time t to yield a new clock time. The difference
--   d may be either positive or negative.
addToClockTime :: TimeDiff -> ClockTime -> ClockTime

-- | converts a time difference to normal form.
normalizeTimeDiff :: TimeDiff -> TimeDiff

-- | formats time differences using local conventions.
timeDiffToString :: TimeDiff -> String

-- | formats time differences using local conventions and a formatting
--   string. The formatting string is that understood by the ISO C
--   strftime() function.
formatTimeDiff :: TimeLocale -> String -> TimeDiff -> String

-- | CalendarTime is a user-readable and manipulable representation
--   of the internal ClockTime type.
data CalendarTime
CalendarTime :: Int -> Month -> Int -> Int -> Int -> Int -> Integer -> Day -> Int -> String -> Int -> Bool -> CalendarTime

-- | Year (pre-Gregorian dates are inaccurate)
[ctYear] :: CalendarTime -> Int

-- | Month of the year
[ctMonth] :: CalendarTime -> Month

-- | Day of the month (1 to 31)
[ctDay] :: CalendarTime -> Int

-- | Hour of the day (0 to 23)
[ctHour] :: CalendarTime -> Int

-- | Minutes (0 to 59)
[ctMin] :: CalendarTime -> Int

-- | Seconds (0 to 61, allowing for up to two leap seconds)
[ctSec] :: CalendarTime -> Int

-- | Picoseconds
[ctPicosec] :: CalendarTime -> Integer

-- | Day of the week
[ctWDay] :: CalendarTime -> Day

-- | Day of the year (0 to 364, or 365 in leap years)
[ctYDay] :: CalendarTime -> Int

-- | Name of the time zone
[ctTZName] :: CalendarTime -> String

-- | Variation from UTC in seconds
[ctTZ] :: CalendarTime -> Int

-- | True if Daylight Savings Time would be in effect, and
--   False otherwise
[ctIsDST] :: CalendarTime -> Bool

-- | A month of the year.
data Month
January :: Month
February :: Month
March :: Month
April :: Month
May :: Month
June :: Month
July :: Month
August :: Month
September :: Month
October :: Month
November :: Month
December :: Month

-- | A day of the week.
data Day
Sunday :: Day
Monday :: Day
Tuesday :: Day
Wednesday :: Day
Thursday :: Day
Friday :: Day
Saturday :: Day

-- | converts an internal clock time to a local time, modified by the
--   timezone and daylight savings time settings in force at the time of
--   conversion. Because of this dependence on the local environment,
--   toCalendarTime is in the IO monad.
toCalendarTime :: ClockTime -> IO CalendarTime

-- | converts an internal clock time into a CalendarTime in standard
--   UTC format.
toUTCTime :: ClockTime -> CalendarTime

-- | converts a CalendarTime into the corresponding internal
--   ClockTime, ignoring the contents of the ctWDay,
--   ctYDay, ctTZName and ctIsDST fields.
toClockTime :: CalendarTime -> ClockTime

-- | formats calendar times using local conventions.
calendarTimeToString :: CalendarTime -> String

-- | formats calendar times using local conventions and a formatting
--   string. The formatting string is that understood by the ISO C
--   strftime() function.
formatCalendarTime :: TimeLocale -> String -> CalendarTime -> String
instance GHC.Show.Show System.Time.TimeDiff
instance GHC.Read.Read System.Time.TimeDiff
instance GHC.Classes.Ord System.Time.TimeDiff
instance GHC.Classes.Eq System.Time.TimeDiff
instance GHC.Show.Show System.Time.CalendarTime
instance GHC.Read.Read System.Time.CalendarTime
instance GHC.Classes.Ord System.Time.CalendarTime
instance GHC.Classes.Eq System.Time.CalendarTime
instance GHC.Classes.Ord System.Time.ClockTime
instance GHC.Classes.Eq System.Time.ClockTime
instance GHC.Show.Show System.Time.Day
instance GHC.Read.Read System.Time.Day
instance GHC.Arr.Ix System.Time.Day
instance GHC.Enum.Bounded System.Time.Day
instance GHC.Enum.Enum System.Time.Day
instance GHC.Classes.Ord System.Time.Day
instance GHC.Classes.Eq System.Time.Day
instance GHC.Show.Show System.Time.Month
instance GHC.Read.Read System.Time.Month
instance GHC.Arr.Ix System.Time.Month
instance GHC.Enum.Bounded System.Time.Month
instance GHC.Enum.Enum System.Time.Month
instance GHC.Classes.Ord System.Time.Month
instance GHC.Classes.Eq System.Time.Month
instance GHC.Show.Show System.Time.ClockTime
