summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-28 07:32:21 +0200
committerThanos Apollo <[email protected]>2023-12-28 07:32:21 +0200
commit9c479396ca9d25653c5888870e967c327000937f (patch)
treedb2617f50c20210033ec2d6b22360ad8dee3de26 /gnosis.el
parentbe4c80642ef8da8bd377ced3d1f6ef9c8e0dd720 (diff)
Add gnosis-review-is-due-p
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 3c0956f..7420252 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -422,6 +422,12 @@ Returns a list of the form ((yyyy mm dd) ef)."
(gnosis-get 'n 'review-log `(= id ,id))
ef success ff c-success)))
+(defun gnosis-review-is-due-p (note-id)
+ "Return t if unsuspended note with NOTE-ID is due today."
+ (emacsql gnosis-db `[:select [id] :from review-log :where (and (<= next-rev ',(gnosis-algorithm-date))
+ (= suspend 0)
+ (= id ,note-id))]))
+
(defun gnosis-review-get-due-notes ()
"Get due notes id for current date.