packages feed

hourglass 0.2.0 → 0.2.1

raw patch · 5 files changed

+12/−9 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.Hourglass: localTimePrint :: (TimeFormat format, Timeable t) => format -> LocalTime t -> LocalTime String
+ Data.Hourglass: localTimePrint :: (TimeFormat format, Timeable t) => format -> LocalTime t -> String

Files

CHANGELOG.md view
@@ -1,4 +1,4 @@-## Version WIP+## Version 0.2.0 (3 Jun 2014)  - use tasty to replace test-framework - add some inlining pragma to tentatively deal with rules properly.
Data/Hourglass/Diff.hs view
@@ -62,6 +62,7 @@     fromSeconds s = (durationNormalize (Duration 0 0 s 0), 0)     toSeconds d   = fst $ durationFlatten d +-- | Flatten a duration to a number of seconds, nanoseconds durationFlatten :: Duration -> (Seconds, NanoSeconds) durationFlatten (Duration h m s (NanoSeconds ns)) =     (toSeconds h + toSeconds m + s + Seconds sacc, NanoSeconds ns')
Data/Hourglass/Format.hs view
@@ -157,9 +157,9 @@         fmtToString Format_MonthName_Short = take 3 $ show (dateMonth date)         fmtToString Format_Day2     = pad2 (dateDay date)         fmtToString Format_Day      = show (dateDay date)-        fmtToString Format_Hour     = pad2 (todHour tm)-        fmtToString Format_Minute   = pad2 (todMin tm)-        fmtToString Format_Second   = pad2 (todSec tm)+        fmtToString Format_Hour     = pad2 (fromIntegral (todHour tm) :: Int)+        fmtToString Format_Minute   = pad2 (fromIntegral (todMin tm) :: Int)+        fmtToString Format_Second   = pad2 (fromIntegral (todSec tm) :: Int)         fmtToString Format_UnixSecond = show unixSecs         fmtToString Format_TimezoneName   = "" --         fmtToString Format_Tz_Offset = show tz@@ -181,10 +181,10 @@ -- -- The actual output is determined by the format used. localTimePrint :: (TimeFormat format, Timeable t)-               => format           -- ^ the format to use for printing-               -> LocalTime t      -- ^ the local time to print-               -> LocalTime String -- ^ the resulting local time string-localTimePrint fmt lt = fmap (printWith fmt (localTimeGetTimezone lt)) lt+               => format      -- ^ the format to use for printing+               -> LocalTime t -- ^ the local time to print+               -> String      -- ^ the resulting local time string+localTimePrint fmt lt = localTimeUnwrap $ fmap (printWith fmt (localTimeGetTimezone lt)) lt  -- | Pretty print time to a string --
Data/Hourglass/Types.hs view
@@ -46,6 +46,8 @@ import Control.DeepSeq import Data.Hourglass.Utils (pad2) +-- | Represent any time interval that has an+-- equivalent value to a number of seconds. class TimeInterval i where     toSeconds   :: i -> Seconds     fromSeconds :: Seconds -> (i, Seconds)
hourglass.cabal view
@@ -1,5 +1,5 @@ Name:                hourglass-Version:             0.2.0+Version:             0.2.1 Synopsis:            simple performant time related library Description:     Simple time library focusing on simple but powerful and performant API