summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMateusz Loskot <mateusz@loskot.net>2012-10-22 00:41:20 +0100
committerMateusz Loskot <mateusz@loskot.net>2012-10-22 00:41:20 +0100
commit09e75d3b3e65f7c64fa9ea02af54c890156b0baf (patch)
treee70bf029262f76faa5b43a980a0ae14a151774c5 /src
parentec257c670d5ce0d0248e70267f576d163e334f24 (diff)
downloadhakyll-09e75d3b3e65f7c64fa9ea02af54c890156b0baf.tar.gz
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).
Diffstat (limited to 'src')
-rw-r--r--src/Hakyll/Web/Page/Metadata.hs1
1 files changed, 1 insertions, 0 deletions
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" .