gom-latn.js 4.4 KB

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