comparison doc/dates.txt @ 395:b4d207b1522d

The `format_timedelta` function now returns, for example, ?1 day? instead of ?0 days? if the granularity is `day` and the delta is less than a day but greater than zero.
author cmlenz
date Tue, 15 Jul 2008 16:02:17 +0000
parents 0f7f4226f765
children
comparison
equal deleted inserted replaced
394:0f7f4226f765 395:b4d207b1522d
232 232
233 >>> delta = timedelta(days=6) 233 >>> delta = timedelta(days=6)
234 >>> format_timedelta(delta, threshold=1.2, locale='en_US') 234 >>> format_timedelta(delta, threshold=1.2, locale='en_US')
235 u'6 days' 235 u'6 days'
236 >>> format_timedelta(delta, granularity='month', locale='en_US') 236 >>> format_timedelta(delta, granularity='month', locale='en_US')
237 u'0 months' 237 u'1 month'
238 238
239 239
240 Time-zone Support 240 Time-zone Support
241 ================= 241 =================
242 242
Copyright (C) 2012-2017 Edgewall Software