summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mumi/xapian.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/mumi/xapian.scm b/mumi/xapian.scm
index debee37..8546e78 100644
--- a/mumi/xapian.scm
+++ b/mumi/xapian.scm
@@ -137,6 +137,8 @@ messages and index their contents in the Xapian database at DBPATH."
(define (sanitize-date-range token)
(define now (current-time))
+ (define (hours n)
+ (make-time time-duration 0 (* 60 60 n)))
(define (days n)
(make-time time-duration 0 (* 60 60 24 n)))
(define (range-boundary->date-string boundary*)
@@ -159,6 +161,8 @@ messages and index their contents in the Xapian database at DBPATH."
(subtract-duration
now
(match unit
+ ((or "h" "hour" "hours")
+ (hours n))
((or "d" "day" "days")
(days n))
((or "w" "week" "weeks")