diff options
author | Jun Omae <jun66j5@gmail.com> | 2022-05-10 19:22:55 +0900 |
---|---|---|
committer | Jun Omae <jun66j5@gmail.com> | 2022-05-10 19:22:55 +0900 |
commit | 38a0e42f5ed756dce41ad45801bf702b5404e69a (patch) | |
tree | 5054e78f60726cc75f58db030e0ef9452e3c53cc | |
parent | cf1abf100a977e0619e3f64f83905e3dd8676fe1 (diff) | |
download | babel-38a0e42f5ed756dce41ad45801bf702b5404e69a.tar.gz |
Improve doctest for `DateTimeFormat.format_period`
-rw-r--r-- | babel/dates.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/babel/dates.py b/babel/dates.py index 0b37323..63357c4 100644 --- a/babel/dates.py +++ b/babel/dates.py @@ -1456,23 +1456,23 @@ class DateTimeFormat(object): """ 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'清晨' |