packages feed

iCalendar 0.2.1 → 0.3

raw patch · 5 files changed

+16/−10 lines, 5 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

- Text.ICalendar.Types: Created :: DateTime -> OtherParams -> Created
+ Text.ICalendar.Types: Created :: UTCTime -> OtherParams -> Created
- Text.ICalendar.Types: createdValue :: Created -> DateTime
+ Text.ICalendar.Types: createdValue :: Created -> UTCTime

Files

Text/ICalendar/Parser/Components.hs view
@@ -60,7 +60,7 @@         throwError "A VEVENT in a VCALENDAR without a METHOD requires a \                    \DTSTART property."     veClass <- optLine1 "CLASS" parseClass-    veCreated <- optLine1 "CREATED" $ parseSimpleDateTime ((Just .) . Created)+    veCreated <- optLine1 "CREATED" (Just .: parseCreated)     veDescription <- optLine1 "DESCRIPTION" .                     parseAltRepLang $ (((Just .) .) .) . Description     veGeo <- optLine1 "GEO" (Just .: parseGeo)@@ -104,8 +104,7 @@     vtClass <- optLine1 "CLASS" parseClass     vtCompleted <- optLine1 "COMPLETED" . parseSimpleDateTime $                 (Just .) . Completed-    vtCreated <- optLine1 "CREATED" . parseSimpleDateTime $-                (Just .) . Created+    vtCreated <- optLine1 "CREATED" (Just .: parseCreated)     vtDTStart <- optLine1 "DTSTART" $                 Just .: parseSimpleDateOrDateTime DTStartDateTime DTStartDate     vtDescription <- optLine1 "DESCRIPTION" .@@ -219,8 +218,7 @@     vjDTStamp <- reqLine1 "DTSTAMP" $ parseSimpleUTC DTStamp     vjUID <- reqLine1 "UID" $ parseSimple UID     vjClass <- optLine1 "CLASS" parseClass-    vjCreated <- optLine1 "CREATED" . parseSimpleDateTime $-                (Just .) . Created+    vjCreated <- optLine1 "CREATED" (Just .: parseCreated)     vjDTStart <- optLine1 "DTSTART" $                 Just .: parseSimpleDateOrDateTime DTStartDateTime DTStartDate     vjDescription <- optLineN "DESCRIPTION" $ parseAltRepLang Description
Text/ICalendar/Parser/Properties.hs view
@@ -341,6 +341,14 @@                        return . RRule y $ toO o parseRRule _ x = throwError $ "parseRRule: " ++ show x +-- | Parse Created, 3.8.7.3+parseCreated :: Content -> ContentParser Created+parseCreated (ContentLine _ "CREATED" o bs) = do+    createdValue <- mustBeUTC =<< parseDateTime Nothing bs+    let createdOther = toO o+    return Created {..}+parseCreated x = throwError $ "parseCreated: " ++ show x+ -- | Parse Last Modified, 3.8.7.3 parseLastModified :: Content -> ContentParser LastModified parseLastModified (ContentLine _ "LAST-MODIFIED" o bs) = do
Text/ICalendar/Printer.hs view
@@ -354,8 +354,8 @@  instance IsProperty Created where     printProperty Created {..} = ln $ do-        prop "CREATED" $ toParam createdOther <> toParam createdValue-        printValue createdValue+        prop "CREATED" createdOther+        printUTCTime createdValue  instance IsProperty Description  where     printProperty Description {..} = ln $ do
Text/ICalendar/Types.hs view
@@ -808,7 +808,7 @@  -- | Date-Time Created. 3.8.7.1. data Created = Created-    { createdValue :: DateTime+    { createdValue :: UTCTime     , createdOther :: OtherParams     } deriving (Show, Eq, Ord, Typeable) 
iCalendar.cabal view
@@ -1,5 +1,5 @@ name:                iCalendar-version:             0.2.1+version:             0.3 synopsis:            iCalendar data types, parser, and printer. description:         Data definitions, parsing and printing of the iCalendar                      format (RFC5545).@@ -31,7 +31,7 @@                      , Text.ICalendar.Parser.Parameters                      , Text.ICalendar.Parser.Properties                      , Paths_iCalendar-  build-depends:       base ==4.*, time ==1.4.*, data-default >=0.3+  build-depends:       base >=4.5 && <5, time ==1.4.*, data-default >=0.3                      , case-insensitive >=0.4, network ==2.4.*                      , bytestring >=0.10 && < 0.11, parsec ==3.1.*                      , text, containers >= 0.5 && < 0.6, mime ==0.3.*