summaryrefslogtreecommitdiff
path: root/haunt.scm
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-04-30 17:42:36 -0400
committerJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-04-30 17:42:36 -0400
commit2f7ecb6da870dc0aabcdd396e0ec540c0e729277 (patch)
tree603c5ae972bf652369fc02245922736d7af92a51 /haunt.scm
parent09166980c403504d1e9aca387182ec88cf9837f7 (diff)
Replace Haunt's default 'string->date* function
Diffstat (limited to 'haunt.scm')
-rw-r--r--haunt.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/haunt.scm b/haunt.scm
index 666a6ff..8769630 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -174,6 +174,14 @@ free culture works available under the " ,%cc-by-sa-link " license.")
"projects.html"
`((h1 "Projects"))))
+;; Replace Haunt's default 'string->date* function with one that recognizes the
+;; date format that Org uses.
+(define (org-string->date str)
+ "Convert STR, a string in Org format, into a SRFI-19 date object."
+ (string->date str "<~Y-~m-~d ~a>"))
+
+(register-metadata-parser! 'date org-string->date)
+
(define (read-html-post-prime port)
(values (read-metadata-headers port)
(let loop ((ret '()))