JS Built-ins
IntlPluralRulesintermediate

Ordinal plural rules

πŸ“– Usage Example
const pr = new Intl.PluralRules('en-US', { type: 'ordinal' });
pr.select(1); // 'one'  (1st)
pr.select(2); // 'two'  (2nd)

Use type:'ordinal' for ordinal numbers (1st, 2nd, 3rd...).

Use Intl.PluralRules with type: "ordinal".

πŸ’‘ Hints (1)
  • β€’ Use type: "ordinal"