packages feed

timezone-olson 0.1.8 → 0.1.9

raw patch · 7 files changed

+31/−13 lines, 7 filesdep ~time

Dependency ranges changed: time

Files

Data/Time/LocalTime/TimeZone/Olson.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Data.Time.LocalTime.TimeZone.Olson--- Copyright   :  Yitzchak Gale 2010+-- Copyright   :  Yitzchak Gale 2018 -- -- Maintainer  :  Yitzchak Gale <gale@sefer.org> -- Portability :  portable@@ -13,7 +13,7 @@ -- converting the parsed data into @TimeZoneSeries@ and @TimeZone@ -- objects. -{- Copyright (c) 2010 Yitzchak Gale. All rights reserved.+{- Copyright (c) 2018 Yitzchak Gale. All rights reserved. For licensing information, see the BSD3-style license in the file LICENSE that was originally distributed by the author together with this file. -}
Data/Time/LocalTime/TimeZone/Olson/Parse.hs view
@@ -3,7 +3,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Data.Time.LocalTime.TimeZone.Olson.Parse--- Copyright   :  Yitzchak Gale 2010+-- Copyright   :  Yitzchak Gale 2018 -- -- Maintainer  :  Yitzchak Gale <gale@sefer.org> -- Portability :  portable@@ -14,7 +14,7 @@ -- <http://www.twinsun.com/tz/tz-link.htm>. Functions are provided for -- converting the parsed data into 'TimeZoneSeries' objects. -{- Copyright (c) 2010 Yitzchak Gale. All rights reserved.+{- Copyright (c) 2018 Yitzchak Gale. All rights reserved. For licensing information, see the BSD3-style license in the file LICENSE that was originally distributed by the author together with this file. -}
Data/Time/LocalTime/TimeZone/Olson/Render.hs view
@@ -2,7 +2,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Data.Time.LocalTime.TimeZone.Olson.Render--- Copyright   :  Yitzchak Gale 2010+-- Copyright   :  Yitzchak Gale 2018 -- -- Maintainer  :  Yitzchak Gale <gale@sefer.org> -- Portability :  portable@@ -12,7 +12,7 @@ -- Unix-like systems. For more information about this format, see -- <http://www.twinsun.com/tz/tz-link.htm>. -{- Copyright (c) 2010 Yitzchak Gale. All rights reserved.+{- Copyright (c) 2018ZZ Yitzchak Gale. All rights reserved. For licensing information, see the BSD3-style license in the file LICENSE that was originally distributed by the author together with this file. -}
Data/Time/LocalTime/TimeZone/Olson/Types.hs view
@@ -1,8 +1,9 @@ {-# OPTIONS_HADDOCK hide #-}+{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module      :  Data.Time.LocalTime.TimeZone.Olson.Types--- Copyright   :  Yitzchak Gale 2010+-- Copyright   :  Yitzchak Gale 2018 -- -- Maintainer  :  Yitzchak Gale <gale@sefer.org> -- Portability :  portable@@ -14,7 +15,7 @@ -- -- Both Version 1 and Version 2 timezone data can be represented. -{- Copyright (c) 2010 Yitzchak Gale. All rights reserved.+{- Copyright (c) 2018 Yitzchak Gale. All rights reserved. For licensing information, see the BSD3-style license in the file LICENSE that was originally distributed by the author together with this file. -}@@ -36,6 +37,9 @@ ) where +#if MIN_VERSION_base(4,11,0)+import Data.Semigroup (Semigroup(..))+#endif import Data.Monoid (Monoid(..)) import Control.Monad (mplus) @@ -71,13 +75,25 @@     }   deriving (Eq, Show) +#if MIN_VERSION_base(4,11,0)+instance Semigroup OlsonData where+  OlsonData a  b  c  d <> OlsonData a' b' c' d' =+      OlsonData (a ++ map (shiftBy $ length b) a')+                (b ++ b') (c ++ c') (d `mplus` d')+    where+      shiftBy n trans = trans {transIndex = n + transIndex trans}+ instance Monoid OlsonData where   mempty = OlsonData [] [] [] Nothing+#else+instance Monoid OlsonData where+  mempty = OlsonData [] [] [] Nothing   mappend (OlsonData a  b  c  d ) (OlsonData a' b' c' d') =       OlsonData (a ++ map (shiftBy $ length b) a')                 (b ++ b') (c ++ c') (d `mplus` d')     where       shiftBy n trans = trans {transIndex = n + transIndex trans}+#endif  -- | A @Transition@ represents a moment when the clocks change in a -- timezone. It consists of a Unix timestamp value that indicates the
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2010-2015 Yitzchak Gale. All rights reserved.+Copyright (c) 2010-2018 Yitzchak Gale. All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are
README.md view
@@ -19,7 +19,7 @@ package for a way to include timezone informaton from a binary Olson timezone file at compile time. -Copyright (c) 2010-2015 Yitzchak Gale. All rights reserved.+Copyright (c) 2010-2018 Yitzchak Gale. All rights reserved.  For licensing information, see the BSD3-style license in the file LICENSE that was originally distributed by the author together with
timezone-olson.cabal view
@@ -1,5 +1,5 @@ Name:                timezone-olson-Version:             0.1.8+Version:             0.1.9 Synopsis:            A pure Haskell parser and renderer for binary Olson timezone files Description:         A parser and renderer for binary Olson timezone                      files whose format is specified by the tzfile(5)@@ -20,11 +20,13 @@ License-file:        LICENSE Author:              Yitzchak Gale Maintainer:          yitz@sefer.org-Copyright:           Copyright (c) 2010-2015 Yitzchak Gale. All rights reserved.+Copyright:           Copyright (c) 2010-2018 Yitzchak Gale. All rights reserved. Category:            Data Build-type:          Simple Extra-source-files:  README.md, catTZ.hs, hzdump.hs Cabal-version:       >=1.10+Tested-with:         GHC > 8.0 && < 8.5+ Source-repository HEAD   type:              git   location:          https://github.com/ygale/timezone-olson.git@@ -37,7 +39,7 @@                     , Data.Time.LocalTime.TimeZone.Olson.Types   Build-depends:       base >= 3.0 && < 5.0,                        timezone-series >= 0.1.0 && < 0.2,-                       time >= 1.6 && < 1.9,+                       time >= 1.6 && < 1.10,                        binary >= 0.4.1 && < 0.9,                        bytestring >= 0.9 && < 1.0,                        extensible-exceptions >= 0.1.0 && < 0.2