Node-Red configuration
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ne.js 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. //! moment.js locale configuration
  2. //! locale : Nepalese [ne]
  3. //! author : suvash : https://github.com/suvash
  4. ;(function (global, factory) {
  5. typeof exports === 'object' && typeof module !== 'undefined'
  6. && typeof require === 'function' ? factory(require('../moment')) :
  7. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  8. factory(global.moment)
  9. }(this, (function (moment) { 'use strict';
  10. //! moment.js locale configuration
  11. var symbolMap = {
  12. 1: '१',
  13. 2: '२',
  14. 3: '३',
  15. 4: '४',
  16. 5: '५',
  17. 6: '६',
  18. 7: '७',
  19. 8: '८',
  20. 9: '९',
  21. 0: '०',
  22. },
  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 ne = moment.defineLocale('ne', {
  36. months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
  37. '_'
  38. ),
  39. monthsShort:
  40. 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
  41. '_'
  42. ),
  43. monthsParseExact: true,
  44. weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
  45. '_'
  46. ),
  47. weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
  48. weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
  49. weekdaysParseExact: true,
  50. longDateFormat: {
  51. LT: 'Aको h:mm बजे',
  52. LTS: 'Aको h:mm:ss बजे',
  53. L: 'DD/MM/YYYY',
  54. LL: 'D MMMM YYYY',
  55. LLL: 'D MMMM YYYY, Aको h:mm बजे',
  56. LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
  57. },
  58. preparse: function (string) {
  59. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  60. return numberMap[match];
  61. });
  62. },
  63. postformat: function (string) {
  64. return string.replace(/\d/g, function (match) {
  65. return symbolMap[match];
  66. });
  67. },
  68. meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
  69. meridiemHour: function (hour, meridiem) {
  70. if (hour === 12) {
  71. hour = 0;
  72. }
  73. if (meridiem === 'राति') {
  74. return hour < 4 ? hour : hour + 12;
  75. } else if (meridiem === 'बिहान') {
  76. return hour;
  77. } else if (meridiem === 'दिउँसो') {
  78. return hour >= 10 ? hour : hour + 12;
  79. } else if (meridiem === 'साँझ') {
  80. return hour + 12;
  81. }
  82. },
  83. meridiem: function (hour, minute, isLower) {
  84. if (hour < 3) {
  85. return 'राति';
  86. } else if (hour < 12) {
  87. return 'बिहान';
  88. } else if (hour < 16) {
  89. return 'दिउँसो';
  90. } else if (hour < 20) {
  91. return 'साँझ';
  92. } else {
  93. return 'राति';
  94. }
  95. },
  96. calendar: {
  97. sameDay: '[आज] LT',
  98. nextDay: '[भोलि] LT',
  99. nextWeek: '[आउँदो] dddd[,] LT',
  100. lastDay: '[हिजो] LT',
  101. lastWeek: '[गएको] dddd[,] LT',
  102. sameElse: 'L',
  103. },
  104. relativeTime: {
  105. future: '%sमा',
  106. past: '%s अगाडि',
  107. s: 'केही क्षण',
  108. ss: '%d सेकेण्ड',
  109. m: 'एक मिनेट',
  110. mm: '%d मिनेट',
  111. h: 'एक घण्टा',
  112. hh: '%d घण्टा',
  113. d: 'एक दिन',
  114. dd: '%d दिन',
  115. M: 'एक महिना',
  116. MM: '%d महिना',
  117. y: 'एक बर्ष',
  118. yy: '%d बर्ष',
  119. },
  120. week: {
  121. dow: 0, // Sunday is the first day of the week.
  122. doy: 6, // The week that contains Jan 6th is the first week of the year.
  123. },
  124. });
  125. return ne;
  126. })));