my.js 3.2 KB

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