en-gb.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // numeral.js locale configuration
  2. // locale : english united kingdom (uk)
  3. // author : Dan Ristic : https://github.com/dristic
  4. (function (global, factory) {
  5. if (typeof define === 'function' && define.amd) {
  6. define(['../numeral'], factory);
  7. } else if (typeof module === 'object' && module.exports) {
  8. factory(require('../numeral'));
  9. } else {
  10. factory(global.numeral);
  11. }
  12. }(this, function (numeral) {
  13. numeral.register('locale', 'en-gb', {
  14. delimiters: {
  15. thousands: ',',
  16. decimal: '.'
  17. },
  18. abbreviations: {
  19. thousand: 'k',
  20. million: 'm',
  21. billion: 'b',
  22. trillion: 't'
  23. },
  24. ordinal: function (number) {
  25. var b = number % 10;
  26. return (~~ (number % 100 / 10) === 1) ? 'th' :
  27. (b === 1) ? 'st' :
  28. (b === 2) ? 'nd' :
  29. (b === 3) ? 'rd' : 'th';
  30. },
  31. currency: {
  32. symbol: '£'
  33. }
  34. });
  35. }));