[Haskell-cafe] ANN: leapseconds-announced-2009
Bjorn Buckwalter
bjorn.buckwalter at gmail.com
Sat Jan 17 00:23:13 EST 2009
Dear all,
I'm pleased to announce the upload of the leapseconds-announced
package[1] to Hackage. leapseconds-announced contains a single module
and a single function implementing the
Data.Time.Clock.TAI.LeapSecondTable interface (type).
The documentation[2] for Data.Time.Clock.TAI.LeapSecondTable says "No
table is provided, as any program compiled with it would become out of
date in six months" and with that I have no objections. However, I
frequently find myself needing a LeapSecondTable for a quick-and-dirty
one-off analysis or simulation of the present or past. In these cases
I've lazily used "(const 33)" (or more recently: "(const 34)") as my
LeapSecondTable.
leapseconds-announced is a pragmatic, if imperfect, improvement over
my past practices. It provides a LeapSecondTable with all leap seconds
announced to date (hence the name). Once the IERS announces[3] another
leap second the package will need an update and all code using it a
recompile. While this precludes its use in long-running production
applications it is eminently adequate for my one-off uses or for
applications that can afford to recompile infrequently.
While, in the words of the Data.Time.Clock.TAI documentation, "most
people won't need this module" I hope it can be of utility to someone.
Thanks,
Bjorn Buckwalter
[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/leapseconds-announced
[2] http://www.haskell.org/ghc/docs/latest/html/libraries/time/Data-Time-Clock-TAI.html
[3] http://hpiers.obspm.fr/eoppc/bul/bulc/bulletinc.dat
More information about the Haskell-Cafe
mailing list