my.js 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. //! moment.js locale configuration
  2. //! locale : Burmese [my]
  3. //! author : Squar team, mysquar.com
  4. //! author : David Rossellat : https://github.com/gholadr
  5. //! author : Tin Aung Lin : https://github.com/thanyawzinmin
  6. ;(function (global, factory) {
  7. typeof exports === 'object' && typeof module !== 'undefined'
  8. && typeof require === 'function' ? factory(require('../moment')) :
  9. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  10. factory(global.moment)
  11. }(this, function (moment) { 'use strict';
  12. var symbolMap = {
  13. '1': '၁',
  14. '2': '၂',
  15. '3': '၃',
  16. '4': '၄',
  17. '5': '၅',
  18. '6': '၆',
  19. '7': '၇',
  20. '8': '၈',
  21. '9': '၉',
  22. '0': '၀'
  23. }, numberMap = {
  24. '၁': '1',
  25. '၂': '2',
  26. '၃': '3',
  27. '၄': '4',
  28. '၅': '5',
  29. '၆': '6',
  30. '၇': '7',
  31. '၈': '8',
  32. '၉': '9',
  33. '၀': '0'
  34. };
  35. var my = moment.defineLocale('my', {
  36. months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'),
  37. monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
  38. weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'),
  39. weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
  40. weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
  41. longDateFormat: {
  42. LT: 'HH:mm',
  43. LTS: 'HH:mm:ss',
  44. L: 'DD/MM/YYYY',
  45. LL: 'D MMMM YYYY',
  46. LLL: 'D MMMM YYYY HH:mm',
  47. LLLL: 'dddd D MMMM YYYY HH:mm'
  48. },
  49. calendar: {
  50. sameDay: '[ယနေ.] LT [မှာ]',
  51. nextDay: '[မနက်ဖြန်] LT [မှာ]',
  52. nextWeek: 'dddd LT [မှာ]',
  53. lastDay: '[မနေ.က] LT [မှာ]',
  54. lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
  55. sameElse: 'L'
  56. },
  57. relativeTime: {
  58. future: 'လာမည့် %s မှာ',
  59. past: 'လွန်ခဲ့သော %s က',
  60. s: 'စက္ကန်.အနည်းငယ်',
  61. m: 'တစ်မိနစ်',
  62. mm: '%d မိနစ်',
  63. h: 'တစ်နာရီ',
  64. hh: '%d နာရီ',
  65. d: 'တစ်ရက်',
  66. dd: '%d ရက်',
  67. M: 'တစ်လ',
  68. MM: '%d လ',
  69. y: 'တစ်နှစ်',
  70. yy: '%d နှစ်'
  71. },
  72. preparse: function (string) {
  73. return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
  74. return numberMap[match];
  75. });
  76. },
  77. postformat: function (string) {
  78. return string.replace(/\d/g, function (match) {
  79. return symbolMap[match];
  80. });
  81. },
  82. week: {
  83. dow: 1, // Monday is the first day of the week.
  84. doy: 4 // The week that contains Jan 1st is the first week of the year.
  85. }
  86. });
  87. return my;
  88. }));