From 2f7ecb6da870dc0aabcdd396e0ec540c0e729277 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Tue, 30 Apr 2019 17:42:36 -0400 Subject: Replace Haunt's default 'string->date* function --- haunt.scm | 8 ++++++++ 1 file changed, 8 insertions(+) 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 '())) -- cgit v1.3