gom-latn.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. //! moment.js locale configuration
  2. //! locale : Konkani Latin script [gom-latn]
  3. //! author : The Discoverer : https://github.com/WikiDiscoverer
  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. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  12. var format = {
  13. s: ['thoddea sekondamni', 'thodde sekond'],
  14. ss: [number + ' sekondamni', number + ' sekond'],
  15. m: ['eka mintan', 'ek minut'],
  16. mm: [number + ' mintamni', number + ' mintam'],
  17. h: ['eka voran', 'ek vor'],
  18. hh: [number + ' voramni', number + ' voram'],
  19. d: ['eka disan', 'ek dis'],
  20. dd: [number + ' disamni', number + ' dis'],
  21. M: ['eka mhoinean', 'ek mhoino'],
  22. MM: [number + ' mhoineamni', number + ' mhoine'],
  23. y: ['eka vorsan', 'ek voros'],
  24. yy: [number + ' vorsamni', number + ' vorsam'],
  25. };
  26. return isFuture ? format[key][0] : format[key][1];
  27. }
  28. var gomLatn = moment.defineLocale('gom-latn', {
  29. months: {
  30. standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
  31. '_'
  32. ),
  33. format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
  34. '_'
  35. ),
  36. isFormat: /MMMM(\s)+D[oD]?/,
  37. },
  38. monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split(
  39. '_'
  40. ),
  41. monthsParseExact: true,
  42. weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
  43. weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
  44. weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
  45. weekdaysParseExact: true,
  46. longDateFormat: {
  47. LT: 'A h:mm [vazta]',
  48. LTS: 'A h:mm:ss [vazta]',
  49. L: 'DD-MM-YYYY',
  50. LL: 'D MMMM YYYY',
  51. LLL: 'D MMMM YYYY A h:mm [vazta]',
  52. LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
  53. llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
  54. },
  55. calendar: {
  56. sameDay: '[Aiz] LT',
  57. nextDay: '[Faleam] LT',
  58. nextWeek: '[Fuddlo] dddd[,] LT',
  59. lastDay: '[Kal] LT',
  60. lastWeek: '[Fattlo] dddd[,] LT',
  61. sameElse: 'L',
  62. },
  63. relativeTime: {
  64. future: '%s',
  65. past: '%s adim',
  66. s: processRelativeTime,
  67. ss: processRelativeTime,
  68. m: processRelativeTime,
  69. mm: processRelativeTime,
  70. h: processRelativeTime,
  71. hh: processRelativeTime,
  72. d: processRelativeTime,
  73. dd: processRelativeTime,
  74. M: processRelativeTime,
  75. MM: processRelativeTime,
  76. y: processRelativeTime,
  77. yy: processRelativeTime,
  78. },
  79. dayOfMonthOrdinalParse: /\d{1,2}(er)/,
  80. ordinal: function (number, period) {
  81. switch (period) {
  82. // the ordinal 'er' only applies to day of the month
  83. case 'D':
  84. return number + 'er';
  85. default:
  86. case 'M':
  87. case 'Q':
  88. case 'DDD':
  89. case 'd':
  90. case 'w':
  91. case 'W':
  92. return number;
  93. }
  94. },
  95. week: {
  96. dow: 0, // Sunday is the first day of the week
  97. doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
  98. },
  99. meridiemParse: /rati|sokallim|donparam|sanje/,
  100. meridiemHour: function (hour, meridiem) {
  101. if (hour === 12) {
  102. hour = 0;
  103. }
  104. if (meridiem === 'rati') {
  105. return hour < 4 ? hour : hour + 12;
  106. } else if (meridiem === 'sokallim') {
  107. return hour;
  108. } else if (meridiem === 'donparam') {
  109. return hour > 12 ? hour : hour + 12;
  110. } else if (meridiem === 'sanje') {
  111. return hour + 12;
  112. }
  113. },
  114. meridiem: function (hour, minute, isLower) {
  115. if (hour < 4) {
  116. return 'rati';
  117. } else if (hour < 12) {
  118. return 'sokallim';
  119. } else if (hour < 16) {
  120. return 'donparam';
  121. } else if (hour < 20) {
  122. return 'sanje';
  123. } else {
  124. return 'rati';
  125. }
  126. },
  127. });
  128. return gomLatn;
  129. })));