summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.