From 09e75d3b3e65f7c64fa9ea02af54c890156b0baf Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Mon, 22 Oct 2012 00:41:20 +0100 Subject: Allow parsing of relaxed ISO8601 date format in published metadata field. Many of HTML to Markdown converters output non-ISO8601 through YAML emitters. YAML (and other systems) allow the T separator to be replaced by a space for increased readability (see http://sourceforge.net/mailarchive/message.php?msg_id=29987568). --- src/Hakyll/Web/Page/Metadata.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Hakyll/Web/Page/Metadata.hs') diff --git a/src/Hakyll/Web/Page/Metadata.hs b/src/Hakyll/Web/Page/Metadata.hs index 8873afc..022912d 100644 --- a/src/Hakyll/Web/Page/Metadata.hs +++ b/src/Hakyll/Web/Page/Metadata.hs @@ -175,6 +175,7 @@ getUTCMaybe :: TimeLocale -- ^ Output time locale getUTCMaybe locale page = msum [ fromPublished "%a, %d %b %Y %H:%M:%S UT" , fromPublished "%Y-%m-%dT%H:%M:%SZ" + , fromPublished "%Y-%m-%d %H:%M:%S" , fromPublished "%B %e, %Y %l:%M %p" , fromPublished "%B %e, %Y" , getFieldMaybe "path" page >>= parseTime' "%Y-%m-%d" . -- cgit v1.2.3