normalizeDate: Allow dates with year only (%Y)

This commit is contained in:
Shaun Attfield 2013-12-01 10:19:08 +02:00
parent 2461f244e3
commit 82813b5585

View file

@ -270,7 +270,7 @@ normalizeDate s = fmap (formatTime defaultTimeLocale "%F")
(msum $ map (\fs -> parsetimeWith fs s) formats :: Maybe Day)
where parsetimeWith = parseTime defaultTimeLocale
formats = ["%x","%m/%d/%Y", "%D","%F", "%d %b %Y",
"%d %B %Y", "%b. %d, %Y", "%B %d, %Y"]
"%d %B %Y", "%b. %d, %Y", "%B %d, %Y", "%Y"]
--
-- Pandoc block and inline list processing