You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
3.4 KiB

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