summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnosis.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index a53c917..38c5046 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -176,6 +176,11 @@ Returns a list of the form ((yyyy mm dd) ef)."
"Get due notes for current date."
(gnosis--select 'id 'review-log `(<= next-rev ',(gnosis-algorithm-date))))
+(defun gnosis-review--get-offset (id)
+ "Get offset for note with value of id ID."
+ (let ((last-rev (gnosis-get 'last-rev 'review-log `(= id ,id))))
+ (gnosis-algorithm-date-diff last-rev)))
+
(defun gnosis-review-mcq-choices (id)
"Display multiple choice answers for question ID."
(let ((answer (gnosis-get 'answer 'notes `(= id ,id)))