when calculating delay, compare against cutoff, not current time

This commit is contained in:
Damien Elmes 2011-02-20 13:45:45 +09:00
parent 88fdaef939
commit 008c5904ca

View file

@ -979,10 +979,10 @@ and type between 1 and 2""",
"Return an adjusted delay value for CARD based on EASE."
if self.cardIsNew(card):
return 0
if card.combinedDue <= time.time():
return (time.time() - card.due) / 86400.0
if card.combinedDue <= self.dueCutoff:
return (self.dueCutoff - card.due) / 86400.0
else:
return (time.time() - card.combinedDue) / 86400.0
return (self.dueCutoff - card.combinedDue) / 86400.0
def resetCards(self, ids):
"Reset progress on cards in IDS."