summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-03-10 15:57:41 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-03-10 15:57:41 -0400
commitb55c32d4c6cb63ffd6d9ce49eee8be95628c9746 (patch)
treef4d15499f39cb35e4e13e0ff587b55877935bb0c /Command
parent2878880f7b7de4ef78abf6c39434153a1a3647bc (diff)
Drop support for building with old versions of directory, feed, and http-types.
Diffstat (limited to 'Command')
-rw-r--r--Command/ImportFeed.hs8
1 files changed, 0 insertions, 8 deletions
diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs
index ebc763868..6318136f2 100644
--- a/Command/ImportFeed.hs
+++ b/Command/ImportFeed.hs
@@ -272,24 +272,16 @@ feedFile tmpl i extension = Utility.Format.format tmpl $
, extractField "itempubdate" [pubdate $ item i]
]
where
-#if MIN_VERSION_feed(0,3,9)
pubdate itm = case getItemPublishDate itm :: Maybe (Maybe UTCTime) of
Just (Just d) -> Just $
formatTime defaultTimeLocale "%F" d
-- if date cannot be parsed, use the raw string
_ -> replace "/" "-" <$> getItemPublishDateString itm
-#else
- pubdate _ = Nothing
-#endif
extractMetaData :: ToDownload -> MetaData
-#if MIN_VERSION_feed(0,3,9)
extractMetaData i = case getItemPublishDate (item i) :: Maybe (Maybe UTCTime) of
Just (Just d) -> unionMetaData meta (dateMetaData d meta)
_ -> meta
-#else
-extractMetaData i = meta
-#endif
where
tometa (k, v) = (mkMetaFieldUnchecked k, S.singleton (toMetaValue v))
meta = MetaData $ M.fromList $ map tometa $ extractFields i