From: Alex Morega Date: Mon, 6 Jan 2014 20:48:15 +0000 (+0200) Subject: specify locale X-Git-Tag: 2.0~3^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2eb475f835375c1b3b7fefcb7d8aad7047d7fda7;p=thirdparty%2Fbabel.git specify locale otherwise, running tests in another locale fails fixes #45, thanks @Arfrever! --- diff --git a/babel/dates.py b/babel/dates.py index 72674e8a..73d54fa5 100644 --- a/babel/dates.py +++ b/babel/dates.py @@ -733,9 +733,9 @@ def format_timedelta(delta, granularity='second', threshold=.85, In addition directional information can be provided that informs the user if the date is in the past or in the future: - >>> format_timedelta(timedelta(hours=1), add_direction=True) + >>> format_timedelta(timedelta(hours=1), add_direction=True, locale='en') u'In 1 hour' - >>> format_timedelta(timedelta(hours=-1), add_direction=True) + >>> format_timedelta(timedelta(hours=-1), add_direction=True, locale='en') u'1 hour ago' :param delta: a ``timedelta`` object representing the time difference to