-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12107 from bbc/chinese-trad-timestamp-updates
Update Chinese trad timestamp object
- Loading branch information
Showing
5 changed files
with
469 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const moment = require('moment'); | ||
require('moment/locale/zh-tw'); | ||
|
||
moment.updateLocale('zh-tw', { | ||
longDateFormat: { | ||
LL: 'YYYY年M月D日', | ||
LLL: 'YYYY年M月D日Ah時mm分', | ||
}, | ||
relativeTime: { | ||
// these keys have been overridden with our translations | ||
// some other keys have been left as set upstream | ||
// see https://github.com/moment/moment/blob/develop/src/locale/zh-tw.js | ||
m: '1 分鐘', | ||
mm: '%d 分鐘', | ||
h: '1 小時', | ||
hh: '%d 小時', | ||
}, | ||
}); |
Oops, something went wrong.