Ohm-Management - Projektarbeit B-ME
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.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. //! moment.js locale configuration
  2. ;(function (global, factory) {
  3. typeof exports === 'object' && typeof module !== 'undefined'
  4. && typeof require === 'function' ? factory(require('../moment')) :
  5. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  6. factory(global.moment)
  7. }(this, (function (moment) { 'use strict';
  8. var symbolMap = {
  9. '1': '૧',
  10. '2': '૨',
  11. '3': '૩',
  12. '4': '૪',
  13. '5': '૫',
  14. '6': '૬',
  15. '7': '૭',
  16. '8': '૮',
  17. '9': '૯',
  18. '0': '૦'
  19. },
  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 gu = moment.defineLocale('gu', {
  33. months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'),
  34. monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'),
  35. monthsParseExact: true,
  36. weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'),
  37. weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
  38. weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
  39. longDateFormat: {
  40. LT: 'A h:mm વાગ્યે',
  41. LTS: 'A h:mm:ss વાગ્યે',
  42. L: 'DD/MM/YYYY',
  43. LL: 'D MMMM YYYY',
  44. LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
  45. LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે'
  46. },
  47. calendar: {
  48. sameDay: '[આજ] LT',
  49. nextDay: '[કાલે] LT',
  50. nextWeek: 'dddd, LT',
  51. lastDay: '[ગઇકાલે] LT',
  52. lastWeek: '[પાછલા] dddd, LT',
  53. sameElse: 'L'
  54. },
  55. relativeTime: {
  56. future: '%s મા',
  57. past: '%s પેહલા',
  58. s: 'અમુક પળો',
  59. ss: '%d સેકંડ',
  60. m: 'એક મિનિટ',
  61. mm: '%d મિનિટ',
  62. h: 'એક કલાક',
  63. hh: '%d કલાક',
  64. d: 'એક દિવસ',
  65. dd: '%d દિવસ',
  66. M: 'એક મહિનો',
  67. MM: '%d મહિનો',
  68. y: 'એક વર્ષ',
  69. yy: '%d વર્ષ'
  70. },
  71. preparse: function (string) {
  72. return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
  73. return numberMap[match];
  74. });
  75. },
  76. postformat: function (string) {
  77. return string.replace(/\d/g, function (match) {
  78. return symbolMap[match];
  79. });
  80. },
  81. // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
  82. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
  83. meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
  84. meridiemHour: function (hour, meridiem) {
  85. if (hour === 12) {
  86. hour = 0;
  87. }
  88. if (meridiem === 'રાત') {
  89. return hour < 4 ? hour : hour + 12;
  90. } else if (meridiem === 'સવાર') {
  91. return hour;
  92. } else if (meridiem === 'બપોર') {
  93. return hour >= 10 ? hour : hour + 12;
  94. } else if (meridiem === 'સાંજ') {
  95. return hour + 12;
  96. }
  97. },
  98. meridiem: function (hour, minute, isLower) {
  99. if (hour < 4) {
  100. return 'રાત';
  101. } else if (hour < 10) {
  102. return 'સવાર';
  103. } else if (hour < 17) {
  104. return 'બપોર';
  105. } else if (hour < 20) {
  106. return 'સાંજ';
  107. } else {
  108. return 'રાત';
  109. }
  110. },
  111. week: {
  112. dow: 0, // Sunday is the first day of the week.
  113. doy: 6 // The week that contains Jan 6th is the first week of the year.
  114. }
  115. });
  116. return gu;
  117. })));