summaryrefslogtreecommitdiff
path: root/gnosis-algorithm.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-06 08:21:38 +0300
committerThanos Apollo <[email protected]>2024-08-06 08:21:38 +0300
commit7ef8763f7601affee39442da842b7bdfcce4736b (patch)
treeaeae36e138119aa3ab264e7303b8507e71ab646b /gnosis-algorithm.el
parent20fb72110ab4fc2f300f67a7419141e0b0713cf0 (diff)
algorithm-date: Add assertions for offset.
Diffstat (limited to 'gnosis-algorithm.el')
-rw-r--r--gnosis-algorithm.el1
1 files changed, 1 insertions, 0 deletions
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)