de2056d9b244113bc781ed28e9042c539db0c6c6300dcae031e919589fcbf101892cbfc0e390bf8b344213a15ec23413319cf9e06bbe65dc3bf0edfc3aaa11 444 B

123456789101112131415
  1. import './prototype';
  2. import { getSetGlobalLocale } from './locales';
  3. import toInt from '../utils/to-int';
  4. getSetGlobalLocale('en', {
  5. ordinalParse: /\d{1,2}(th|st|nd|rd)/,
  6. ordinal : function (number) {
  7. var b = number % 10,
  8. output = (toInt(number % 100 / 10) === 1) ? 'th' :
  9. (b === 1) ? 'st' :
  10. (b === 2) ? 'nd' :
  11. (b === 3) ? 'rd' : 'th';
  12. return number + output;
  13. }
  14. });