Skip to content

Commit 56e58ee

Browse files
authored
Align Format of cn-zh Timeframe (#1058)
1 parent 98bb910 commit 56e58ee

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

arrow/locales.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,15 +951,15 @@ class ChineseCNLocale(Locale):
951951

952952
timeframes = {
953953
"now": "刚才",
954-
"second": "一秒",
954+
"second": "1秒",
955955
"seconds": "{0}秒",
956956
"minute": "1分钟",
957957
"minutes": "{0}分钟",
958958
"hour": "1小时",
959959
"hours": "{0}小时",
960960
"day": "1天",
961961
"days": "{0}天",
962-
"week": "一周",
962+
"week": "1周",
963963
"weeks": "{0}周",
964964
"month": "1个月",
965965
"months": "{0}个月",

tests/test_locales.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,15 +1839,15 @@ def test_format_timeframe(self):
18391839
class TestChineseCNLocale:
18401840
def test_format_timeframe(self):
18411841
assert self.locale._format_timeframe("now", 0) == "刚才"
1842-
assert self.locale._format_timeframe("second", 1) == "一秒"
1842+
assert self.locale._format_timeframe("second", 1) == "1秒"
18431843
assert self.locale._format_timeframe("seconds", 30) == "30秒"
18441844
assert self.locale._format_timeframe("minute", 1) == "1分钟"
18451845
assert self.locale._format_timeframe("minutes", 40) == "40分钟"
18461846
assert self.locale._format_timeframe("hour", 1) == "1小时"
18471847
assert self.locale._format_timeframe("hours", 23) == "23小时"
18481848
assert self.locale._format_timeframe("day", 1) == "1天"
18491849
assert self.locale._format_timeframe("days", 12) == "12天"
1850-
assert self.locale._format_timeframe("week", 1) == "一周"
1850+
assert self.locale._format_timeframe("week", 1) == "1周"
18511851
assert self.locale._format_timeframe("weeks", 38) == "38周"
18521852
assert self.locale._format_timeframe("month", 1) == "1个月"
18531853
assert self.locale._format_timeframe("months", 11) == "11个月"

0 commit comments

Comments
 (0)