Skip to content

Commit

Permalink
2012-07-01 leap second.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornbm committed Jan 8, 2012
1 parent 97f86fb commit 3c9ff80
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions Data/Time/Clock/AnnouncedLeapSeconds.hs
@@ -1,7 +1,7 @@
-- This file was automatically generated.

{- |
Copyright : Copyright (C) 2009 Bjorn Buckwalter
Copyright : Copyright (C) 2009-2012 Bjorn Buckwalter
License : BSD3
Maintainer : bjorn.buckwalter@gmail.com
Expand Down Expand Up @@ -29,7 +29,8 @@ import Data.Time (Day, fromGregorian)
import Data.Time.Clock.TAI (LeapSecondTable)

leapSeconds :: [(Day, Integer)]
leapSeconds = (fromGregorian 2009 01 01, 34)
leapSeconds = (fromGregorian 2012 07 01, 35)
: (fromGregorian 2009 01 01, 34)
: (fromGregorian 2006 01 01, 33)
: (fromGregorian 1999 01 01, 32)
: (fromGregorian 1997 07 01, 31)
Expand Down Expand Up @@ -60,7 +61,7 @@ leapSeconds = (fromGregorian 2009 01 01, 34)
: []

-- | 'Data.Time.Clock.TAI.LeapSecondTable' containing all leap seconds
-- up to 2009-01-01.
-- up to 2012-07-01.
lst :: LeapSecondTable
lst d = snd $ headDef (undefined,0) $ dropWhile ((>d).fst) leapSeconds
where headDef def xs = if null xs then def else head xs -- Inspired by Safe.
Expand Down
2 changes: 1 addition & 1 deletion MakeLeapSecondTable.hs
Expand Up @@ -51,7 +51,7 @@ showModule eops = unlines
[ "-- This file was automatically generated."
, ""
, "{- |"
, " Copyright : Copyright (C) 2009 Bjorn Buckwalter"
, " Copyright : Copyright (C) 2009-2012 Bjorn Buckwalter"
, " License : BSD3"
, ""
, " Maintainer : bjorn.buckwalter@gmail.com"
Expand Down
6 changes: 3 additions & 3 deletions leapseconds-announced.cabal
@@ -1,8 +1,8 @@
Name: leapseconds-announced
Version: 2009
Version: 2012
License: BSD3
License-File: LICENSE
Copyright: Bjorn Buckwalter 2009-2010
Copyright: Bjorn Buckwalter 2009-2012
Author: Bjorn Buckwalter
Maintainer: bjorn.buckwalter@gmail.com
Stability: Stable
Expand All @@ -12,7 +12,7 @@ Description:
with the leap seconds announced at library release time.
Category: System
Build-Type: Simple
Build-Depends: base < 5, time < 1.3
Build-Depends: base, time < 2
Exposed-Modules: Data.Time.Clock.AnnouncedLeapSeconds
Extra-source-files: TestLeapSeconds.hs

0 comments on commit 3c9ff80

Please sign in to comment.