git.fiddlerwoaroof.com
Browse code

fix: handle nil dates in older-than-a-month

fiddlerwoaroof authored on 14/10/2022 02:29:13
Showing 1 changed files
... ...
@@ -48,7 +48,9 @@
48 48
 (defun older-than-a-month (date)
49 49
   (let ((month-ago (local-time:timestamp- (local-time:now)
50 50
 					  31 :day)))
51
-    (local-time:timestamp< date month-ago)))
51
+    (if date
52
+        (local-time:timestamp< date month-ago)
53
+        t)))
52 54
 
53 55
 (defun older-than-a-week (date)
54 56
   (let ((week-ago (local-time:timestamp- (local-time:now)