From 38a0e42f5ed756dce41ad45801bf702b5404e69a Mon Sep 17 00:00:00 2001 From: Jun Omae Date: Tue, 10 May 2022 19:22:55 +0900 Subject: [PATCH] Improve doctest for `DateTimeFormat.format_period` --- babel/dates.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/babel/dates.py b/babel/dates.py index 0b3732347..63357c482 100644 --- a/babel/dates.py +++ b/babel/dates.py @@ -1456,23 +1456,23 @@ def format_period(self, char, num): """ Return period from parsed datetime according to format pattern. - >>> format = DateTimeFormat(time(19, 42), 'en_US') + >>> format = DateTimeFormat(time(13, 42), 'fi_FI') >>> format.format_period('a', 1) - u'PM' - + u'ip.' >>> format.format_period('b', 1) - u'evening' - - >>> format.format_period('B', 1) - u'in the evening' + u'iltap.' + >>> format.format_period('b', 4) + u'iltapäivä' + >>> format.format_period('B', 4) + u'iltapäivällä' + >>> format.format_period('B', 5) + u'ip.' >>> format = DateTimeFormat(datetime(2022, 4, 28, 6, 27), 'zh_Hant') >>> format.format_period('a', 1) u'上午' - >>> format.format_period('b', 1) u'清晨' - >>> format.format_period('B', 1) u'清晨'