Basic types for representing points in time are Elapsed and ElapsedP. The
'P' is short for 'precise'. Elapsed represents numbers of non-leap
seconds elapsed since the Unix epoch (that is, the point of time
represented by 1970-01-01 00:00:00 UTC). ElapsedP represents numbers of
non-leap seconds and nanoseconds elapsed since that point in time.
Values of other types representing points in time can be converted to and from
values of the Elapsed and ElapsedP types. For example:
d = timeGetElapsed (Date 1955 April 18) :: Elapsed
timeFromElapsed d :: DateTime
Local time is represented by LocalTimet, parameterised by any other type
representing time (for example, Elapsed, Date or DateTime). A local
time value is augmented by a timezone offset in minutes. For example:
localTime (Date 2014 May 4) 600 -- local time at UTC+10 of 4th May 2014
Type representing offsets in minutes against UTC to obtain local time from
UTC. A positive number represents a location east of where UTC is local time
and a negative number represents a location west of where UTC is local time.
LocalTime t (-300) -- t represents a time at UTC-5
LocalTime t (+480) -- t represents a time at UTC+8
Should be between (-12 * 60) and (+14 * 60).
For example, in timezone AEDT (Australian Eastern Daylight Time) (UTC+11),
local time is 15:47. Consequently, UTC time is 04:47 and the timezone offset
is TimezoneOffset660 (in minutes).
For the given date in the proleptic Gregorian calendar, yield the number of
days before the date in the same year. For example, there are 0 days before
1st January.
Type represeting periods of time in hours, minutes, seconds (non-leap or
all) and nanoseconds. See Period for periods of time in years, months and
days.
Type representing periods of time in years, months and days.
See Duration for periods of time in hours, minutes, seconds (non-leap or
all) and nanoseconds.
For the given local time of one type, yield the corresponding local time of
a different type. This will not compile unless the compiler can infer the
types of the two local times.
The millisecond component only, padded to 3 characters (000 to
999). See Format_MicroSecond and Format_NanoSecond for other
named sub-second components.
The microseconds component only, padded to 3 characters (000 to
999). See Format_MilliSecond and Format_NanoSecond for other
named sub-second components.
The nanoseconds component only, padded to 3 characters (000 to
999). See Format_MilliSecond and Format_MicroSecond for other
named sub-second components.
A parser of a given String. The first argument is the
(DateTime,TimezoneOffset) value before the parser is
applied. If the parser fails, the Left value provides an error message.
If it succeeds, the Right value provides a pair of a
(DateTime,TimezoneOffset) value and any input not consumed
by the parser.