WashNGo-2.12.0.1: WASH is a family of EDSLs for programming Web applications in Haskell.

WASH.Utility.ISO8601

Synopsis

Documentation

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 ISODate Source

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 ISOTime Source

Instances

Read ISOTime

external entry point

argument determines whether extended format is parsed

time parsers

Show ISOTime 
ToSeconds ISOTime 
Reason ISOTime