From 61972d32d72b5e9bfcc99d691433eb74a8d62a7e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 13 Nov 2008 17:16:27 +0900 Subject: [PATCH] remove 'tomorrow' special case, add boost for initial 2 --- anki/deck.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/anki/deck.py b/anki/deck.py index 6b8bcaad2..c0684ed82 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -440,7 +440,10 @@ strftime("%s", "now")+1 from decks)""")) interval = random.uniform(self.easyIntervalMin, self.easyIntervalMax) else: - # otherwise, multiply the old interval by a factor + # if the last interval was initial hard, boost it + if interval < self.hardIntervalMax: + interval = self.hardIntervalMax * 3.5; + # multiply last interval by factor if ease == 2: interval = (interval + delay/4) * 1.2 elif ease == 3: @@ -455,14 +458,8 @@ strftime("%s", "now")+1 from decks)""")) def nextIntervalStr(self, card, ease, short=False): "Return the next interval for CARD given EASE as a string." - if card.interval == 0 and ease == 2: - if short: - return _("tom.") - else: - return _("Tomorrow") - else: - int = self.nextInterval(card, ease) - return anki.utils.fmtTimeSpan(int*86400, short=short) + int = self.nextInterval(card, ease) + return anki.utils.fmtTimeSpan(int*86400, short=short) def nextDue(self, card, ease, oldState): "Return time when CARD will expire given EASE."