Library for handling date and time information.
Author: Michael Hanus
Version: April 2007
| Exported names: |
Datatypes:
CalendarTime
| ClockTime
Constructors:
CalendarTime
Functions:
addDays
| addHours
| addMinutes
| addMonths
| addSeconds
| addYears
| calendarTimeToString
| clockTimeToInt
| compareCalendarTime
| compareClockTime
| compareDate
| ctDay
| ctHour
| ctMin
| ctMonth
| ctSec
| ctTZ
| ctYear
| daysOfMonth
| getClockTime
| getLocalTime
| toCalendarTime
| toClockTime
| toDayString
| toTimeString
| toUTCTime
| validDate
| Summary of exported functions: |
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
| Imported modules: |
| Exported datatypes: |
ClockTime represents a clock time in some internal representation.
Constructors:
A calendar time is presented in the following form: (CalendarTime year month day hour minute second timezone) where timezone is an integer representing the timezone as a difference to UTC time in seconds.
Constructors:
:: Int -> Int -> Int -> Int -> Int -> Int -> Int -> CalendarTime
| Exported functions: |
:: CalendarTime -> Int
The year of a calendar time.
:: CalendarTime -> Int
The month of a calendar time.
:: CalendarTime -> Int
The day of a calendar time.
:: CalendarTime -> Int
The hour of a calendar time.
:: CalendarTime -> Int
The minute of a calendar time.
:: CalendarTime -> Int
The second of a calendar time.
:: CalendarTime -> Int
The time zone of a calendar time. The value of the time zone is the difference to UTC time in seconds.
:: IO ClockTime
Returns the current clock time.
:: IO CalendarTime
Returns the local calendar time.
:: ClockTime -> Int
Transforms a clock time into a unique integer. It is ensured that clock times that differs in at least one second are mapped into different integers.
:: ClockTime -> IO CalendarTime
Transforms a clock time into a calendar time according to the local time (if possible). Since the result depends on the local environment, it is an I/O operation.
:: ClockTime -> CalendarTime
Transforms a clock time into a standard UTC calendar time. Thus, this operationa is independent on the local time.
:: CalendarTime -> ClockTime
Transforms a calendar time (interpreted as UTC time) into a clock time.
:: CalendarTime -> String
Transforms a calendar time into a readable form.
:: CalendarTime -> String
Transforms a calendar time into a string containing the day, e.g., "September 23, 2006".
:: CalendarTime -> String
Transforms a calendar time into a string containing the time.
:: Int -> ClockTime -> ClockTime
Adds seconds to a given time.
:: Int -> ClockTime -> ClockTime
Adds minutes to a given time.
:: Int -> ClockTime -> ClockTime
Adds hours to a given time.
:: Int -> ClockTime -> ClockTime
Adds days to a given time.
:: Int -> ClockTime -> ClockTime
Adds months to a given time.
:: Int -> ClockTime -> ClockTime
Adds years to a given time.
:: Int -> Int -> Int
Gets the days of a month in a year.
:: Int -> Int -> Int -> Bool
Is a date consisting of year/month/day valid?
:: CalendarTime -> CalendarTime -> Ordering
Compares two dates (don't use it, just for backward compatibility!).
:: CalendarTime -> CalendarTime -> Ordering
Compares two calendar times.
:: ClockTime -> ClockTime -> Ordering
Compares two clock times.