Skip to content

Commit

Permalink
feat: add missing meridiem to locale "zh-hk"
Browse files Browse the repository at this point in the history
  • Loading branch information
Myles Fang committed Aug 21, 2023
1 parent a466a60 commit 8f24f16
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/locale/zh-hk.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ const locale = {
MM: '%d 個月',
y: '一年',
yy: '%d 年'
},
meridiem: (hour, minute) => {
const hm = (hour * 100) + minute
if (hm < 600) {
return '凌晨'
} else if (hm < 900) {
return '早上'
} else if (hm < 1100) {
return '上午'
} else if (hm < 1300) {
return '中午'
} else if (hm < 1800) {
return '下午'
}
return '晚上'
}
}

Expand Down

0 comments on commit 8f24f16

Please sign in to comment.