Skip to content

Commit

Permalink
fix: zh-tw / zh-hk locale ordinal error (#1976)
Browse files Browse the repository at this point in the history
  • Loading branch information
zonemeen committed Jul 19, 2022
1 parent fd51fe4 commit 0a1bd08
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/locale/zh-hk.js
Expand Up @@ -8,7 +8,14 @@ const locale = {
weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
ordinal: n => `${n}日`,
ordinal: (number, period) => {
switch (period) {
case 'W':
return `${number}週`
default:
return `${number}日`
}
},
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
Expand Down
9 changes: 8 additions & 1 deletion src/locale/zh-tw.js
Expand Up @@ -8,7 +8,14 @@ const locale = {
weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
ordinal: n => `${n}日`,
ordinal: (number, period) => {
switch (period) {
case 'W':
return `${number}週`
default:
return `${number}日`
}
},
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
Expand Down

0 comments on commit 0a1bd08

Please sign in to comment.