Node-Red configuration
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.

my.js 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. },
  19. numberMap = {
  20. '၁': '1',
  21. '၂': '2',
  22. '၃': '3',
  23. '၄': '4',
  24. '၅': '5',
  25. '၆': '6',
  26. '၇': '7',
  27. '၈': '8',
  28. '၉': '9',
  29. '၀': '0',
  30. };
  31. export default moment.defineLocale('my', {
  32. months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
  33. '_'
  34. ),
  35. monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
  36. weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
  37. '_'
  38. ),
  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. ss: '%d စက္ကန့်',
  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 4th is the first week of the year.
  86. },
  87. });