summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-01-09 10:39:01 +0200
committerThanos Apollo <[email protected]>2024-01-09 10:39:01 +0200
commit542d6ad2cf21e6afde421c58999c8e68701301a1 (patch)
tree939381af2cd0ec2b64b18c812b96af7bf0de9b4d /gnosis.el
parent689398a7711b548cdec2f31e3ac4ae5174d992bc (diff)
Add gnosis-review-is-due-today-p
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 9c8ea40..b9e7d04 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -757,6 +757,15 @@ Check if it's suspended, and if it's due today."
(gnosis-review-is-due-today-p note-id))
t
nil))
+
+(defun gnosis-review-is-due-today-p (id)
+ "Return t if note with ID is due today.
+
+This function ignores if note is suspended. Refer to
+`gnosis-review-is-due-p' if you need to check for suspended value as
+well."
+ (let ((next-rev (gnosis-get 'next-rev 'review-log `(= id ,id))))
+ (gnosis-past-or-present-p next-rev)))
(defun gnosis-review--algorithm (id success)
"Return next review date & ef for note with value of id ID.