From 7ef8763f7601affee39442da842b7bdfcce4736b Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 08:21:38 +0300 Subject: algorithm-date: Add assertions for offset. --- gnosis-algorithm.el | 1 + 1 file changed, 1 insertion(+) diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index a032760..f3ea4aa 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -123,6 +123,7 @@ On lethe events the next interval is set to 0." (defun gnosis-algorithm-date (&optional offset) "Return the current date in a list (year month day). Optional integer OFFSET is a number of days from the current date." + (cl-assert (or (numberp offset) (null offset)) nil "Date offset must be an integer or nil") (let* ((now (decode-time)) (now (list (decoded-time-month now) (decoded-time-day now) -- cgit v1.2.3