Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 3 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Showing with 15 additions and 11 deletions.
  1. +4 −3 Data/Time/Clock/AnnouncedLeapSeconds.hs
  2. +1 −1 MakeLeapSecondTable.hs
  3. +7 −4 TestLeapSeconds.hs
  4. +3 −3 leapseconds-announced.cabal
View
7 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
@@ -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)
@@ -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.
View
2 MakeLeapSecondTable.hs
@@ -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"
View
11 TestLeapSeconds.hs
@@ -2,12 +2,15 @@ import Data.Time
import Data.Time.Clock.AnnouncedLeapSeconds
import Test.QuickCheck
-onceCheck = check (defaultConfig {configMaxTest = 1})
+onceCheck = quickCheckWith (stdArgs {maxSuccess = 1})
-- A few trivial tests.
main = do
onceCheck $ lst (fromGregorian 1111 12 31) == 0 -- Before first leap second.
- onceCheck $ lst (fromGregorian 2008 12 31) == 33 -- Prior to last leap second.
- onceCheck $ lst (fromGregorian 2009 01 01) == 34 -- Last leap second.
- onceCheck $ lst (fromGregorian 2009 12 31) == 34 -- Beyond last leap second.
+ onceCheck $ lst (fromGregorian 2008 12 31) == 33
+ onceCheck $ lst (fromGregorian 2009 01 01) == 34
+ onceCheck $ lst (fromGregorian 2009 12 31) == 34
+ onceCheck $ lst (fromGregorian 2012 06 30) == 34 -- Prior to last leap second.
+ onceCheck $ lst (fromGregorian 2012 07 01) == 35 -- Last leap second.
+ onceCheck $ lst (fromGregorian 2012 12 31) == 35 -- Beyond last leap second.
View
6 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
@@ -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 < 10, time < 2
Exposed-Modules: Data.Time.Clock.AnnouncedLeapSeconds
Extra-source-files: TestLeapSeconds.hs

No commit comments for this range

Something went wrong with that request. Please try again.