ordinal
Module to provide the English ordinal letters following a numeral.
If other languages are required, please submit an issue.
Install
npm
npm install --save ordinal
yarn
yarn add ordinal
Examples
Numbers only, anything else will throw a TypeError
.
var ordinal =// '1st'// '2nd'// '3rd'// '4th'// '11th'// '12th'// '13th'// '21st'// '22nd'// '23rd'// '24th'
To get just the indicator:
var indicator =// 'st'// 'nd'// 'rd'// 'th'// 'th'// 'th'// 'th'// 'st'// 'nd'// 'rd'// 'th'