V3 custom scheduling: use elapsed_days?

The 2021-scheduler-FAQ has an example with “states.good.normal.review.easeFactor”. The same FAQ entry for further information points to a file backend.proto.

In this file the only SchedulingState that has the string “ease” in it is in under the message Review. For the message “Review” there also seems to be a message elapsed_days but I can’t access it:

I have this code in my deck options:

if (states.good.normal?.review) {
console.log('... in rev');
let ef = states.good.normal.review.easeFactor;
console.log(ef);
let sgnr = states.good.normal.review;
let props = Object.getOwnPropertyNames(sgnr);
console.log(props);
// this prints: "JS info :7 scheduledDays,easeFactor"
}

I think I misunderstand how the new v3 scheduler works. Am I not supposed to get the days since the last time I rated?

I’d like to use elapsed days to change how Anki handles overdue cards when rating them as good. The default behavior of Anki is to only use half the overdue interval (see here for v3 or here for v2).

I don’t like this because if I remember an overdue card the full actual elapsed interval can safely be used for me. At the same time I don’t want to press “easy” because of the easy bonus that defaults to 1.3. Anki applies the easy bonus to the whole actual interval so that this is often too long for me. Changing the easy bonus to a lower value wouldn’t work for cards that are not overdue and manually switching all the time is also not a real option.

Thanks.

You should be able to accomplish those things. It’s a protobuf object, so zero values don’t show up by default. Try this:

console.log(JSON.stringify(states.$type.toObject(states, {defaults: true}), null, 4))

You’ll want to use elapsedDays from states.current, not states.good.