time 1.9.2 → 1.9.3
raw patch · 10 files changed
+37/−5 lines, 10 files
Files
- changelog.md +3/−0
- configure.ac +1/−1
- lib/Data/Time/Clock/Internal/NominalDiffTime.hs +4/−1
- lib/Data/Time/Clock/Internal/POSIXTime.hs +1/−1
- lib/Data/Time/Clock/POSIX.hs +15/−0
- lib/Data/Time/Format/Locale.hs +1/−1
- lib/Data/Time/Format/Parse.hs +6/−0
- lib/Data/Time/LocalTime/Internal/TimeZone.hs +1/−0
- lib/Data/Time/LocalTime/Internal/ZonedTime.hs +4/−0
- time.cabal +1/−1
changelog.md view
@@ -1,5 +1,8 @@ # Change Log +## [1.9.3]+- documentation fixes+ ## [1.9.2] - add Data and Typeable instance for CalendarDiffDays and CalendarDiffTime - "@since" annotations for everything after 1.9
configure.ac view
@@ -1,4 +1,4 @@-AC_INIT([Haskell time package], [1.9.2], [ashley@semantic.org], [time])+AC_INIT([Haskell time package], [1.9.3], [ashley@semantic.org], [time]) # Safety check: Ensure that we are in the correct source directory. AC_CONFIG_SRCDIR([lib/include/HsTime.h])
lib/Data/Time/Clock/Internal/NominalDiffTime.hs view
@@ -16,8 +16,11 @@ -- | This is a length of time, as measured by UTC.--- Conversion functions will treat it as seconds. -- It has a precision of 10^-12 s.+--+-- Conversion functions will treat it as seconds.+-- For example, @(0.010 :: NominalDiffTime)@ corresponds to 10 milliseconds.+-- -- It ignores leap-seconds, so it's not necessarily a fixed amount of clock time. -- For instance, 23:00 UTC + 2 hours of NominalDiffTime = 01:00 UTC (+ 1 day), -- regardless of whether a leap-second intervened.
lib/Data/Time/Clock/Internal/POSIXTime.hs view
@@ -9,6 +9,6 @@ -- | POSIX time is the nominal time since 1970-01-01 00:00 UTC ----- To convert from a 'Foreign.C.CTime' or 'System.Posix.EpochTime', use 'realToFrac'.+-- To convert from a 'Foreign.C.Types.CTime' or @System.Posix.EpochTime@, use 'realToFrac'. -- type POSIXTime = NominalDiffTime
lib/Data/Time/Clock/POSIX.hs view
@@ -1,5 +1,20 @@ -- | POSIX time, if you need to deal with timestamps and the like. -- Most people won't need this module.+--+-- You can use 'POSIXTime' to obtain integer/word timestamps. For example:+--+-- > import Data.Time+-- > import Data.Time.Clock.POSIX+-- > import Data.Int+-- >+-- > nanosSinceEpoch :: UTCTime -> Int64+-- > nanosSinceEpoch =+-- > floor . (1e9 *) . nominalDiffTimeToSeconds . utcTimeToPOSIXSeconds+-- >+-- > main :: IO ()+-- > main = do+-- > u <- getCurrentTime+-- > print $ nanosSinceEpoch u module Data.Time.Clock.POSIX ( posixDayLength,POSIXTime,posixSecondsToUTCTime,utcTimeToPOSIXSeconds,getPOSIXTime,getCurrentTime,
lib/Data/Time/Format/Locale.hs view
@@ -32,7 +32,7 @@ -- -- 'knownTimeZones' contains only the ten time-zones mentioned in RFC 822 sec. 5: -- \"UT\", \"GMT\", \"EST\", \"EDT\", \"CST\", \"CDT\", \"MST\", \"MDT\", \"PST\", \"PDT\".--- Note that the parsing functions will regardless parse "UTC", single-letter military time-zones, and +HHMM format.+-- Note that the parsing functions will regardless parse \"UTC\", single-letter military time-zones, and +HHMM format. defaultTimeLocale :: TimeLocale defaultTimeLocale = TimeLocale { wDays = [("Sunday", "Sun"), ("Monday", "Mon"),
lib/Data/Time/Format/Parse.hs view
@@ -157,9 +157,15 @@ instance Read LocalTime where readsPrec _ = readParen False $ readSTime True defaultTimeLocale "%Y-%m-%d %H:%M:%S%Q" +-- | This only works for @±HHMM@ format,+-- single-letter military time-zones,+-- and these time-zones: \"UTC\", \"UT\", \"GMT\", \"EST\", \"EDT\", \"CST\", \"CDT\", \"MST\", \"MDT\", \"PST\", \"PDT\". instance Read TimeZone where readsPrec _ = readParen False $ readSTime True defaultTimeLocale "%Z" +-- | This only works for a 'zonedTimeZone' in @±HHMM@ format,+-- single-letter military time-zones,+-- and these time-zones: \"UTC\", \"UT\", \"GMT\", \"EST\", \"EDT\", \"CST\", \"CDT\", \"MST\", \"MDT\", \"PST\", \"PDT\". instance Read ZonedTime where readsPrec n = readParen False $ \s -> [(ZonedTime t z, r2) | (t,r1) <- readsPrec n s, (z,r2) <- readsPrec n r1]
lib/Data/Time/LocalTime/Internal/TimeZone.hs view
@@ -67,6 +67,7 @@ timeZoneOffsetString :: TimeZone -> String timeZoneOffsetString = timeZoneOffsetString'' False (Pad 4 '0') +-- | This only shows the time zone name, or offset if the name is empty. instance Show TimeZone where show zone@(TimeZone _ _ "") = timeZoneOffsetString zone show (TimeZone _ _ name) = name
lib/Data/Time/LocalTime/Internal/ZonedTime.hs view
@@ -14,6 +14,10 @@ -- | A local time together with a time zone.+--+-- There is no 'Eq' instance for @ZonedTime@.+-- If you want to compare local times, use 'zonedTimeToLocalTime'.+-- If you want to compare absolute times, use 'zonedTimeToUTC'. data ZonedTime = ZonedTime { zonedTimeToLocalTime :: LocalTime, zonedTimeZone :: TimeZone
time.cabal view
@@ -1,5 +1,5 @@ name: time-version: 1.9.2+version: 1.9.3 stability: stable license: BSD3 license-file: LICENSE