Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

gu.js 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. //! moment.js locale configuration
  2. //! locale : Gujarati [gu]
  3. //! author : Kaushik Thanki : https://github.com/Kaushik1987
  4. import moment from '../moment';
  5. var symbolMap = {
  6. 1: '૧',
  7. 2: '૨',
  8. 3: '૩',
  9. 4: '૪',
  10. 5: '૫',
  11. 6: '૬',
  12. 7: '૭',
  13. 8: '૮',
  14. 9: '૯',
  15. 0: '૦',
  16. },
  17. numberMap = {
  18. '૧': '1',
  19. '૨': '2',
  20. '૩': '3',
  21. '૪': '4',
  22. '૫': '5',
  23. '૬': '6',
  24. '૭': '7',
  25. '૮': '8',
  26. '૯': '9',
  27. '૦': '0',
  28. };
  29. export default moment.defineLocale('gu', {
  30. months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
  31. '_'
  32. ),
  33. monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
  34. '_'
  35. ),
  36. monthsParseExact: true,
  37. weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
  38. '_'
  39. ),
  40. weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
  41. weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
  42. longDateFormat: {
  43. LT: 'A h:mm વાગ્યે',
  44. LTS: 'A h:mm:ss વાગ્યે',
  45. L: 'DD/MM/YYYY',
  46. LL: 'D MMMM YYYY',
  47. LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
  48. LLLL: 'dddd, D MMMM YYYY, A h: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. ss: '%d સેકંડ',
  63. m: 'એક મિનિટ',
  64. mm: '%d મિનિટ',
  65. h: 'એક કલાક',
  66. hh: '%d કલાક',
  67. d: 'એક દિવસ',
  68. dd: '%d દિવસ',
  69. M: 'એક મહિનો',
  70. MM: '%d મહિનો',
  71. y: 'એક વર્ષ',
  72. yy: '%d વર્ષ',
  73. },
  74. preparse: function (string) {
  75. return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
  76. return numberMap[match];
  77. });
  78. },
  79. postformat: function (string) {
  80. return string.replace(/\d/g, function (match) {
  81. return symbolMap[match];
  82. });
  83. },
  84. // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
  85. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
  86. meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
  87. meridiemHour: function (hour, meridiem) {
  88. if (hour === 12) {
  89. hour = 0;
  90. }
  91. if (meridiem === 'રાત') {
  92. return hour < 4 ? hour : hour + 12;
  93. } else if (meridiem === 'સવાર') {
  94. return hour;
  95. } else if (meridiem === 'બપોર') {
  96. return hour >= 10 ? hour : hour + 12;
  97. } else if (meridiem === 'સાંજ') {
  98. return hour + 12;
  99. }
  100. },
  101. meridiem: function (hour, minute, isLower) {
  102. if (hour < 4) {
  103. return 'રાત';
  104. } else if (hour < 10) {
  105. return 'સવાર';
  106. } else if (hour < 17) {
  107. return 'બપોર';
  108. } else if (hour < 20) {
  109. return 'સાંજ';
  110. } else {
  111. return 'રાત';
  112. }
  113. },
  114. week: {
  115. dow: 0, // Sunday is the first day of the week.
  116. doy: 6, // The week that contains Jan 6th is the first week of the year.
  117. },
  118. });