diff options
Diffstat (limited to 'library/moment/src/lib/locale/en.js')
-rw-r--r-- | library/moment/src/lib/locale/en.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/library/moment/src/lib/locale/en.js b/library/moment/src/lib/locale/en.js new file mode 100644 index 000000000..20964cd9c --- /dev/null +++ b/library/moment/src/lib/locale/en.js @@ -0,0 +1,15 @@ +import './prototype'; +import { getSetGlobalLocale } from './locales'; +import toInt from '../utils/to-int'; + +getSetGlobalLocale('en', { + ordinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal : function (number) { + var b = number % 10, + output = (toInt(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } +}); |