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.
Moduleold-time-1.1.0.4Haskell2010
System.Time
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).
- 5 types
- 12 values
- Packageold-time-1.1.0.4
- Exports17
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceTime.hsc
Clock times
2 declarationsTime differences
7 declarationsrecords the difference between two clock times in a user-readable way.
null time difference.
diffClockTimes t1 t2 returns the difference between two clock
times t1 and t2 as a 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.
converts a time difference to normal form.
formats time differences using local conventions.
formats time differences using local conventions and a formatting string.
The formatting string is that understood by the ISO C strftime()
function.
Calendar times
8 declarationsCalendarTime is a user-readable and manipulable representation of the internal ClockTime type.
Constructors
CalendarTimectYear :: IntYear (pre-Gregorian dates are inaccurate)
ctMonth :: MonthMonth of the year
ctDay :: IntDay of the month (1 to 31)
ctHour :: IntHour of the day (0 to 23)
ctMin :: IntMinutes (0 to 59)
ctSec :: IntSeconds (0 to 61, allowing for up to two leap seconds)
ctPicosec :: IntegerPicoseconds
ctWDay :: DayDay of the week
ctYDay :: IntDay of the year (0 to 364, or 365 in leap years)
ctTZName :: StringName of the time zone
ctTZ :: IntVariation from UTC in seconds
ctIsDST :: Bool
Instances4Eq, Ord, Read, Show
Eq CalendarTimeDefined in old-time-1.1.0.4 · System.TimeOrd CalendarTimeDefined in old-time-1.1.0.4 · System.TimeRead CalendarTimeDefined in old-time-1.1.0.4 · System.TimeShow CalendarTimeDefined in old-time-1.1.0.4 · System.Time
Instances7Bounded, Enum, Eq, Ord, Read, Show, …
Bounded MonthDefined in old-time-1.1.0.4 · System.TimeEnum MonthDefined in old-time-1.1.0.4 · System.TimeEq MonthDefined in old-time-1.1.0.4 · System.TimeOrd MonthDefined in old-time-1.1.0.4 · System.TimeRead MonthDefined in old-time-1.1.0.4 · System.TimeShow MonthDefined in old-time-1.1.0.4 · System.TimeIx MonthDefined in old-time-1.1.0.4 · System.Time
Instances7Bounded, Enum, Eq, Ord, Read, Show, …
Bounded DayDefined in old-time-1.1.0.4 · System.TimeEnum DayDefined in old-time-1.1.0.4 · System.TimeEq DayDefined in old-time-1.1.0.4 · System.TimeOrd DayDefined in old-time-1.1.0.4 · System.TimeRead DayDefined in old-time-1.1.0.4 · System.TimeShow DayDefined in old-time-1.1.0.4 · System.TimeIx DayDefined in old-time-1.1.0.4 · System.Time
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.
converts an internal clock time into a CalendarTime in standard UTC format.
formats calendar times using local conventions.
formats calendar times using local conventions and a formatting string.
The formatting string is that understood by the ISO C strftime()
function.