124a5901b86da0b76e80511906893185bd717a754eb2421ae6417299874d1f0556e34a096073ed11fc2238f8ba2071ecf1eb5e670a552c7e7f58e7c887d428 2.9 KB

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