Skip to content

Commit

Permalink
fix(): update Catalan [ca] locale ordinal
Browse files Browse the repository at this point in the history
  • Loading branch information
albertms10 authored Oct 13, 2020
1 parent fe90bb6 commit 73da380
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/locale/ca.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ const locale = {
y: 'un any',
yy: '%d anys'
},
ordinal: n => `${n}º`
ordinal: (n) => {
let ord

if (n === 1 || n === 3) ord = 'r'
else if (n === 2) ord = 'n'
else if (n === 4) ord = 't'
else ord = 'è'

return `${n}${ord}`
}
}

dayjs.locale(locale, null, true)
Expand Down

0 comments on commit 73da380

Please sign in to comment.