Skip to content

Commit

Permalink
fix: update en-NZ locale to use proper ordinal formatting function (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbow committed Oct 16, 2020
1 parent ee5a4ec commit fcdbc58
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/locale/en-nz.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ const locale = {
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
ordinal: n => n,
ordinal: (n) => {
const s = ['th', 'st', 'nd', 'rd']
const v = n % 100
return `[${n}${s[(v - 20) % 10] || s[v] || s[0]}]`
},
formats: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
Expand Down

0 comments on commit fcdbc58

Please sign in to comment.