Safe Haskell | None |
---|
WASH.Utility.ISO8601
- secondsToString :: Integer -> [Char]
- isoDateToString :: ISODate -> [Char]
- isoDateAndTimeToString :: ISODateAndTime -> [Char]
- 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
- leapSecondCorrection :: Num a => ISOTime -> a
- isoDaysOfYearToSeconds :: Int -> ISODayOfYearSpec -> CalendarTime -> Integer
- isoMonthSpecToMonth :: ISOMonthSpec -> CalendarTime -> Int
- isoDayOfMonthSpecToDayOfMonth :: ISODayOfMonthSpec -> t -> Int
- daysUptoMonth :: (Integral a, Num a1) => a -> Int -> a1
- isoYearSpecToYear :: ISOYearSpec -> CalendarTime -> Int
- leapDays :: (Integral a, Num a1) => a -> a1
- leapYear :: Integral a => a -> Bool
- yearsToDays :: Int -> Int
- yearsToWeekDay :: Int -> Int
- leapSeconds :: [Integer]
- data LeapSeconds
- = LeapSecond Integer
- | NotLeapSecond Integer
- addLeapSeconds :: [Integer] -> Integer -> LeapSeconds
- secondsPerMinute :: Integer
- secondsPerHour :: Integer
- secondsPerDay :: Integer
- secondsPerYear :: Integer
- minutes :: ISOMinuteSpec -> Int
- isoDateToClockTime :: ISODate -> ClockTime
- isoDateAndTimeToClockTime :: ISODateAndTime -> ClockTime
- secondsToClockTime :: Integral a => a -> ClockTime
- epochClkT :: ClockTime
- epoch :: CalendarTime
- 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
- = NoDayOfMonth
- | DayOfMonth Int
- 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
- updateTZ :: ISOTime -> ISOTimeZoneSpec -> ISOTime
- digitval :: Char -> Int
- skipHyphen :: Parser [Char] ()
- skipColon :: Parser [Char] ()
- skipSolidus :: Parser [Char] ()
- skipMinus :: Parser [Char] ()
- skipPlus :: Parser [Char] ()
- skipP :: Parser [Char] ()
- skipT :: Parser [Char] ()
- skipW :: Parser [Char] ()
- skipZ :: Parser [Char] ()
- parseDateFromString :: String -> Maybe ISODate
- parseTimeFromString :: String -> Maybe ISOTime
- parseDateAndTimeFromString :: String -> Maybe ISODateAndTime
- parseDate :: Parser [Char] ISODate
- parseTime :: Parser [Char] ISOTime
- parseDateAndTime :: Parser [Char] ISODateAndTime
- parseBasicOrExtended :: (Bool -> Parser a b) -> Parser a b
- parseTimeAndDateInternal :: Bool -> Parser [Char] ISODateAndTime
- parseDateInternal :: Bool -> Parser [Char] ISODate
- parseTimeInternal :: Bool -> Parser [Char] ISOTime
- parseTZsuffix :: Bool -> Parser [Char] ISOTimeZoneSpec
- parseHoursMinutes :: Bool -> Parser [Char] (ISOHourSpec, ISOMinuteSpec)
- parseLocalTimeInternal :: Bool -> Parser [Char] ISOTime
- checkSeconds :: (Monad m, Num a, Ord a) => a -> m ()
- checkMinutes :: (Monad m, Num a, Ord a) => a -> m ()
- checkHours :: (Monad m, Num a, Ord a) => a -> m ()
- checkDays :: (Monad m, Num a, Ord a) => a -> m ()
- checkWeeks :: (Monad m, Num a, Ord a) => a -> m ()
- parseWeekDay :: Parser [Char] Int
- parseOneDigit :: Parser [Char] Int
- parseTwoDigits :: Parser [Char] Int
- parseThreeDigits :: Parser [Char] Int
- parseOrdinalDay :: Parser [Char] Int
- parseFourDigits :: Parser [Char] Int
Documentation
secondsToString :: Integer -> [Char]Source
isoDateToString :: ISODate -> [Char]Source
isoDateAndTimeToString :: ISODateAndTime -> [Char]Source
applyToCalT :: (CalendarTime -> a) -> IO aSource
isoDateAndTimeToSeconds :: ISODateAndTime -> IO IntegerSource
isoTimeToSeconds :: ISOTime -> IO IntegerSource
isoDateToSeconds :: ISODate -> IO IntegerSource
class ToSeconds iso whereSource
Methods
toSeconds :: iso -> CalendarTime -> IntegerSource
returns number of seconds since reference point
toRawSeconds :: iso -> CalendarTime -> IntegerSource
leapSecondCorrection :: Num a => ISOTime -> aSource
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.
isoDaysOfYearToSeconds :: Int -> ISODayOfYearSpec -> CalendarTime -> IntegerSource
isoMonthSpecToMonth :: ISOMonthSpec -> CalendarTime -> IntSource
isoDayOfMonthSpecToDayOfMonth :: ISODayOfMonthSpec -> t -> IntSource
daysUptoMonth :: (Integral a, Num a1) => a -> Int -> a1Source
isoYearSpecToYear :: ISOYearSpec -> CalendarTime -> IntSource
yearsToDays :: Int -> IntSource
yearsToWeekDay :: Int -> IntSource
compute weekday of Jan 1
leapSeconds :: [Integer]Source
in seconds from epoch; needs to be updated when time leaps again
data LeapSeconds Source
Constructors
LeapSecond Integer | |
NotLeapSecond Integer |
Instances
Show LeapSeconds |
addLeapSeconds :: [Integer] -> Integer -> LeapSecondsSource
secondsPerMinute :: IntegerSource
secondsPerHour :: IntegerSource
secondsPerDay :: IntegerSource
secondsPerYear :: IntegerSource
minutes :: ISOMinuteSpec -> IntSource
isoDateToClockTime :: ISODate -> ClockTimeSource
isoDateAndTimeToClockTime :: ISODateAndTime -> ClockTimeSource
secondsToClockTime :: Integral a => a -> ClockTimeSource
data ISODateAndTime Source
data type for representing ISO time
Constructors
ISODateAndTime ISODate ISOTime |
Instances
Constructors
ISODate ISOYearSpec ISODayOfYearSpec |
data ISOYearSpec Source
Constructors
ImplicitYear | |
ImplicitCentury Int | |
Century Int | |
ImplicitDecade Int | |
Year Int |
Instances
Show ISOYearSpec |
data ISODayOfYearSpec Source
Constructors
NoDayOfYear | |
MonthDay ISOMonthSpec ISODayOfMonthSpec | |
DayOfYear Int | |
WeekAndDay ISOWeekSpec ISODayOfWeekSpec |
Instances
Show ISODayOfYearSpec |
data ISODayOfMonthSpec Source
Constructors
NoDayOfMonth | |
DayOfMonth Int |
Instances
Show ISODayOfMonthSpec |
Constructors
ISOTime ISOHourSpec ISOMinuteSpec ISOSecondSpec ISOTimeZoneSpec |
data ISOSecondSpec Source
Instances
data ISOTimeZoneSpec Source
Constructors
LocalTime | |
UTCTime | |
PlusTime ISOHourSpec ISOMinuteSpec | |
MinusTime ISOHourSpec ISOMinuteSpec |
Instances
updateTZ :: ISOTime -> ISOTimeZoneSpec -> ISOTimeSource
skipHyphen :: Parser [Char] ()Source
skipSolidus :: Parser [Char] ()Source
parseDateFromString :: String -> Maybe ISODateSource
parseTimeFromString :: String -> Maybe ISOTimeSource
parseDateAndTimeFromString :: String -> Maybe ISODateAndTimeSource
parseDateAndTime :: Parser [Char] ISODateAndTimeSource
parseBasicOrExtended :: (Bool -> Parser a b) -> Parser a bSource
parseTimeAndDateInternal :: Bool -> Parser [Char] ISODateAndTimeSource
parseDateInternal :: Bool -> Parser [Char] ISODateSource
argument determines whether extended format is parsed
parseTimeInternal :: Bool -> Parser [Char] ISOTimeSource
time parsers
parseTZsuffix :: Bool -> Parser [Char] ISOTimeZoneSpecSource
parseHoursMinutes :: Bool -> Parser [Char] (ISOHourSpec, ISOMinuteSpec)Source
parseLocalTimeInternal :: Bool -> Parser [Char] ISOTimeSource
checkSeconds :: (Monad m, Num a, Ord a) => a -> m ()Source
checkMinutes :: (Monad m, Num a, Ord a) => a -> m ()Source
checkHours :: (Monad m, Num a, Ord a) => a -> m ()Source
checkWeeks :: (Monad m, Num a, Ord a) => a -> m ()Source
parseWeekDay :: Parser [Char] IntSource
parseOneDigit :: Parser [Char] IntSource
parseTwoDigits :: Parser [Char] IntSource
parseThreeDigits :: Parser [Char] IntSource
parseOrdinalDay :: Parser [Char] IntSource
parseFourDigits :: Parser [Char] IntSource