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.

hr.js 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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 translate(number, withoutSuffix, key) {
  9. var result = number + ' ';
  10. switch (key) {
  11. case 'ss':
  12. if (number === 1) {
  13. result += 'sekunda';
  14. } else if (number === 2 || number === 3 || number === 4) {
  15. result += 'sekunde';
  16. } else {
  17. result += 'sekundi';
  18. }
  19. return result;
  20. case 'm':
  21. return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  22. case 'mm':
  23. if (number === 1) {
  24. result += 'minuta';
  25. } else if (number === 2 || number === 3 || number === 4) {
  26. result += 'minute';
  27. } else {
  28. result += 'minuta';
  29. }
  30. return result;
  31. case 'h':
  32. return withoutSuffix ? 'jedan sat' : 'jednog sata';
  33. case 'hh':
  34. if (number === 1) {
  35. result += 'sat';
  36. } else if (number === 2 || number === 3 || number === 4) {
  37. result += 'sata';
  38. } else {
  39. result += 'sati';
  40. }
  41. return result;
  42. case 'dd':
  43. if (number === 1) {
  44. result += 'dan';
  45. } else {
  46. result += 'dana';
  47. }
  48. return result;
  49. case 'MM':
  50. if (number === 1) {
  51. result += 'mjesec';
  52. } else if (number === 2 || number === 3 || number === 4) {
  53. result += 'mjeseca';
  54. } else {
  55. result += 'mjeseci';
  56. }
  57. return result;
  58. case 'yy':
  59. if (number === 1) {
  60. result += 'godina';
  61. } else if (number === 2 || number === 3 || number === 4) {
  62. result += 'godine';
  63. } else {
  64. result += 'godina';
  65. }
  66. return result;
  67. }
  68. }
  69. var hr = moment.defineLocale('hr', {
  70. months : {
  71. format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),
  72. standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')
  73. },
  74. monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),
  75. monthsParseExact: true,
  76. weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
  77. weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  78. weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),
  79. weekdaysParseExact : true,
  80. longDateFormat : {
  81. LT : 'H:mm',
  82. LTS : 'H:mm:ss',
  83. L : 'DD.MM.YYYY',
  84. LL : 'D. MMMM YYYY',
  85. LLL : 'D. MMMM YYYY H:mm',
  86. LLLL : 'dddd, D. MMMM YYYY H:mm'
  87. },
  88. calendar : {
  89. sameDay : '[danas u] LT',
  90. nextDay : '[sutra u] LT',
  91. nextWeek : function () {
  92. switch (this.day()) {
  93. case 0:
  94. return '[u] [nedjelju] [u] LT';
  95. case 3:
  96. return '[u] [srijedu] [u] LT';
  97. case 6:
  98. return '[u] [subotu] [u] LT';
  99. case 1:
  100. case 2:
  101. case 4:
  102. case 5:
  103. return '[u] dddd [u] LT';
  104. }
  105. },
  106. lastDay : '[jučer u] LT',
  107. lastWeek : function () {
  108. switch (this.day()) {
  109. case 0:
  110. case 3:
  111. return '[prošlu] dddd [u] LT';
  112. case 6:
  113. return '[prošle] [subote] [u] LT';
  114. case 1:
  115. case 2:
  116. case 4:
  117. case 5:
  118. return '[prošli] dddd [u] LT';
  119. }
  120. },
  121. sameElse : 'L'
  122. },
  123. relativeTime : {
  124. future : 'za %s',
  125. past : 'prije %s',
  126. s : 'par sekundi',
  127. ss : translate,
  128. m : translate,
  129. mm : translate,
  130. h : translate,
  131. hh : translate,
  132. d : 'dan',
  133. dd : translate,
  134. M : 'mjesec',
  135. MM : translate,
  136. y : 'godinu',
  137. yy : translate
  138. },
  139. dayOfMonthOrdinalParse: /\d{1,2}\./,
  140. ordinal : '%d.',
  141. week : {
  142. dow : 1, // Monday is the first day of the week.
  143. doy : 7 // The week that contains Jan 7th is the first week of the year.
  144. }
  145. });
  146. return hr;
  147. })));