summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-11 17:18:56 +0300
committerThanos Apollo <[email protected]>2024-08-11 17:18:56 +0300
commit3de3c4626309198ae0fb869bd27b47e8a7f3ef8d (patch)
treec3ef3d1f780abc85dc5ccf5b200afa6accfe6f8b /gnosis.el
parentf1b14fb31b4648ade7ca01c883e2706e06155dcb (diff)
Add function: review-note-overdue-p
* Return t if note with ID is overdue.
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 56b3965..9708fdb 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1423,6 +1423,15 @@ QUERY: String value,"
;; Review
;;;;;;;;;;
+
+(defun gnosis-review-note-overdue-p (id)
+ "Return t if note with ID is overdue.
+
+This function is meant to be used with today's due notes, using
+`gnosis-review-get-due-notes'."
+ (let ((due-date (gnosis-get 'next-rev 'review-log `(= id ,id))))
+ (not (equal due-date (gnosis-algorithm-date)))))
+
(defun gnosis-review-is-due-p (note-id)
"Check if note with value of NOTE-ID for id is due for review.