Skip to content

Commit 5fc05a6

Browse files
JamesBlissiamkun
authored andcommitted
fix: Adding locale zh-hk (#516)
1 parent d93f7b6 commit 5fc05a6

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

src/locale/zh-hk.js

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import dayjs from 'dayjs'
2+
3+
const locale = {
4+
name: 'zh-hk',
5+
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
6+
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
7+
weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
8+
weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
9+
weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
10+
ordinal: n => `${n}日`,
11+
formats: {
12+
LT: 'HH:mm',
13+
LTS: 'HH:mm:ss',
14+
L: 'YYYY/MM/DD',
15+
LL: 'YYYY年M月D日',
16+
LLL: 'YYYY年M月D日 HH:mm',
17+
LLLL: 'YYYY年M月D日dddd HH:mm'
18+
},
19+
relativeTime: {
20+
future: '%s內',
21+
past: '%s前',
22+
s: '幾秒',
23+
m: '一分鐘',
24+
mm: '%d 分鐘',
25+
h: '一小時',
26+
hh: '%d 小時',
27+
d: '一天',
28+
dd: '%d 天',
29+
M: '一個月',
30+
MM: '%d 個月',
31+
y: '一年',
32+
yy: '%d 年'
33+
}
34+
}
35+
36+
dayjs.locale(locale, null, true)
37+
38+
export default locale

0 commit comments

Comments
 (0)