diff options
author | Alex Morega <alex@grep.ro> | 2014-01-06 22:48:15 +0200 |
---|---|---|
committer | Alex Morega <alex@grep.ro> | 2014-01-06 23:12:26 +0200 |
commit | 2eb475f835375c1b3b7fefcb7d8aad7047d7fda7 (patch) | |
tree | d033d669ec43c77d0a2019e1ac78bae3bd94a638 | |
parent | 764f68b42a0f2dc0ad82152f84008503e2ac0d3d (diff) | |
download | babel-2eb475f835375c1b3b7fefcb7d8aad7047d7fda7.tar.gz |
specify locale
otherwise, running tests in another locale fails
fixes #45, thanks @Arfrever!
-rw-r--r-- | babel/dates.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/babel/dates.py b/babel/dates.py index 72674e8..73d54fa 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 |