dates 0.2.0.1 → 0.2.0.2
raw patch · 2 files changed
+7/−4 lines, 2 files
Files
- Data/Dates.hs +6/−3
- dates.cabal +1/−1
Data/Dates.hs view
@@ -4,12 +4,12 @@ (DateTime (..), Time (..), parseDate,- pDate, pDateTime,+ pDate, pDateTime, pTime, getCurrentDateTime, tryRead, DateIntervalType (..), DateInterval (..),- addInterval+ addInterval, addTime ) where import Prelude.Unicode@@ -151,6 +151,9 @@ hd ← ampm return $ Time (h+hd) m s +pTime ∷ Parsec String st Time+pTime = choice $ map try [time12, time24]+ pAbsDateTime ∷ Int → Parsec String st DateTime pAbsDateTime year = do date ← choice $ map try $ map ($ year) $ [@@ -165,7 +168,7 @@ case s of Nothing → return date Just _ → do- t ← choice $ map try [time12,time24]+ t ← pTime return $ date `addTime` t pAbsDate ∷ Int → Parsec String st DateTime
dates.cabal view
@@ -1,5 +1,5 @@ name: dates-version: 0.2.0.1+version: 0.2.0.2 synopsis: Small library for parsing different dates formats. description: This package allows to parse many different formats of dates. Both absolute and relative dates are supported.