WASH.Utility.ISO8601
- applyToCalT :: (CalendarTime -> a) -> IO a
- isoDateAndTimeToSeconds :: ISODateAndTime -> IO Integer
- isoTimeToSeconds :: ISOTime -> IO Integer
- isoDateToSeconds :: ISODate -> IO Integer
- class ToSeconds iso where
- toSeconds :: iso -> CalendarTime -> Integer
- toRawSeconds :: iso -> CalendarTime -> Integer
- leapSeconds :: [Integer]
- data LeapSeconds
- isoDateToClockTime :: ISODate -> ClockTime
- isoDateAndTimeToClockTime :: ISODateAndTime -> ClockTime
- data ISODateAndTime = ISODateAndTime ISODate ISOTime
- data ISODate = ISODate ISOYearSpec ISODayOfYearSpec
- data ISOYearSpec
- = ImplicitYear
- | ImplicitCentury Int
- | Century Int
- | ImplicitDecade Int
- | Year Int
- data ISODayOfYearSpec
- data ISOMonthSpec
- = ImplicitMonth
- | Month Int
- data ISODayOfMonthSpec
- data ISOWeekSpec
- = ImplicitWeek
- | AnyWeek
- | Week Int
- data ISODayOfWeekSpec
- = NoDayOfWeek
- | DayOfWeek Int
- data ISOTime = ISOTime ISOHourSpec ISOMinuteSpec ISOSecondSpec ISOTimeZoneSpec
- data ISOHourSpec
- = ImplicitHour
- | Hour Int
- data ISOMinuteSpec
- = ImplicitMinute
- | Minute Int
- | NoMinute
- data ISOSecondSpec
- data ISOTimeZoneSpec
- parseDateFromString :: String -> Maybe ISODate
- parseTimeFromString :: String -> Maybe ISOTime
- parseDateAndTimeFromString :: String -> Maybe ISODateAndTime
Documentation
applyToCalT :: (CalendarTime -> a) -> IO aSource
class ToSeconds iso whereSource
Methods
toSeconds :: iso -> CalendarTime -> IntegerSource
returns number of seconds since reference point
toRawSeconds :: iso -> CalendarTime -> IntegerSource
Instances
| ToSeconds ISOTimeZoneSpec | |
| ToSeconds ISOSecondSpec | |
| ToSeconds ISOMinuteSpec | |
| ToSeconds ISOHourSpec | |
| ToSeconds ISOTime | |
| ToSeconds ISODate | problem: 19720630T235960 and 19720701T000000 are both mapped to the same number, 78796800, and then addLeapSeconds adds one yielding 78796801. While this is correct for 19720701T000000, 19720630T235960 must be 78796800. Implemented solution: if the current second specification is 0 and the time to convert is the leap second, then add 1. |
| ToSeconds ISODateAndTime |
leapSeconds :: [Integer]Source
compute weekday of Jan 1
in seconds from epoch; needs to be updated when time leaps again
data ISODateAndTime Source
data type for representing ISO time
Constructors
| ISODateAndTime ISODate ISOTime |
Constructors
| ISODate ISOYearSpec ISODayOfYearSpec |
Instances
| Read ISODate | |
| Show ISODate | |
| ToSeconds ISODate | problem: 19720630T235960 and 19720701T000000 are both mapped to the same number, 78796800, and then addLeapSeconds adds one yielding 78796801. While this is correct for 19720701T000000, 19720630T235960 must be 78796800. Implemented solution: if the current second specification is 0 and the time to convert is the leap second, then add 1. |
| Reason ISODate | Date and time in ISO8601 format |
data ISOYearSpec Source
Constructors
| ImplicitYear | |
| ImplicitCentury Int | |
| Century Int | |
| ImplicitDecade Int | |
| Year Int |
Instances
data ISODayOfYearSpec Source
Constructors
| NoDayOfYear | |
| MonthDay ISOMonthSpec ISODayOfMonthSpec | |
| DayOfYear Int | |
| WeekAndDay ISOWeekSpec ISODayOfWeekSpec |
Instances
Constructors
| ISOTime ISOHourSpec ISOMinuteSpec ISOSecondSpec ISOTimeZoneSpec |
data ISOSecondSpec Source
Instances
data ISOTimeZoneSpec Source
Constructors
| LocalTime | |
| UTCTime | |
| PlusTime ISOHourSpec ISOMinuteSpec | |
| MinusTime ISOHourSpec ISOMinuteSpec |
Instances