From 9172c9b697b2c2e62609b3111ea1fca44b4ec471 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 29 Jan 2010 19:28:38 +0900 Subject: [PATCH] remove obsolete time span pair code --- anki/utils.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/anki/utils.py b/anki/utils.py index d0af0472d..d34360899 100644 --- a/anki/utils.py +++ b/anki/utils.py @@ -70,24 +70,6 @@ def fmtTimeSpan(time, pad=0, point=0, short=False, after=False): timestr = "%(a)d.%(b)df" % {'a': pad, 'b': point} return locale.format_string("%" + (fmt % timestr), time) -def fmtTimeSpanPair(time1, time2, short=False, after=False): - (type, point) = optimalPeriod(time1, 0) - time1 = convertSecondsTo(time1, type) - time2 = convertSecondsTo(time2, type) - # a pair is always should always be read as plural - if short: - fmt = shortTimeTable[type] - else: - if after: - fmt = afterTimeTable[type](2) - else: - fmt = timeTable[type](2) - timestr = "%(a)d.%(b)df" % {'a': pad, 'b': point} - finalstr = "%s-%s" % ( - locale.format_string('%' + timestr, time1), - locale.format_string('%' + timestr, time2),) - return fmt % finalstr - def optimalPeriod(time, point): if abs(time) < 60: type = "seconds"