Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Interpretation of leap second files.
- type LeapSecondMap = Day -> Maybe Int
- data LeapSecondList = MkLeapSecondList {
- lslVersion :: Day
- lslExpiration :: Day
- lslTransitions :: [(Day, Int)]
- parseNISTLeapSecondList :: String -> Maybe LeapSecondList
- leapSecondListToMap :: LeapSecondList -> LeapSecondMap
Documentation
type LeapSecondMap = Day -> Maybe Int #
TAI - UTC during this day. No table is provided, as any program compiled with it would become out of date in six months.
data LeapSecondList Source #
A list of leap-second transitions, etc.
MkLeapSecondList | |
|
parseNISTLeapSecondList :: String -> Maybe LeapSecondList Source #
Parse the text of a NIST leap-second file. This file can be found at ftp://time.nist.gov/pub/leap-seconds.list,
and on UNIX systems, at /usr/share/zoneinfo/leap-seconds.list
.
leapSecondListToMap :: LeapSecondList -> LeapSecondMap Source #
Obtain a map that can be used to convert between TAI and UTC (see Data.Time.Clock.TAI)