diff options
-rw-r--r-- | TODO.org | 2 | ||||
-rw-r--r-- | mumi/messages.scm | 12 |
2 files changed, 11 insertions, 3 deletions
@@ -19,5 +19,3 @@ other pages of issues. * Add links to all tag queries (such as "easy") -* broken issues: -37479 diff --git a/mumi/messages.scm b/mumi/messages.scm index 7dcbf18..1e528b3 100644 --- a/mumi/messages.scm +++ b/mumi/messages.scm @@ -96,7 +96,17 @@ yet. Return new results alongside cached results." (extract-name (sender message))) (define (date message) - (or (header message 'date) "unknown date")) + (let ((d (header message 'date))) + (cond + ((date? d) d) + ((boolean? d) + (current-date)) + ((and (string? d) + (string->number d)) => + (lambda (seconds) + (let* ((time (make-time time-utc 0 seconds)) + (date (time-utc->date time))) + date)))))) (define (subject message) (or (header message 'subject) "(no subject)")) |