diff --git a/anki/stats.py b/anki/stats.py index 15badbaf6..24cf16ebd 100644 --- a/anki/stats.py +++ b/anki/stats.py @@ -251,7 +251,12 @@ group by day order by day""" % (self._limit(), lim), tot = totd[-1][1] period = self._periodDays() if not period: - period = first + # base off earliest repetition date + t = self.col.db.scalar("select id from revlog limit 1") + if not t: + period = 1 + else: + period = (self.col.sched.dayCutoff - (t/1000)) / 86400 i = [] self._line(i, _("Days studied"), _("%(pct)d%% (%(x)s of %(y)s)") % dict(