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.

bs.js 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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 bs = moment.defineLocale('bs', {
  70. months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'),
  71. monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'),
  72. monthsParseExact: true,
  73. weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
  74. weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  75. weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),
  76. weekdaysParseExact : true,
  77. longDateFormat : {
  78. LT : 'H:mm',
  79. LTS : 'H:mm:ss',
  80. L : 'DD.MM.YYYY',
  81. LL : 'D. MMMM YYYY',
  82. LLL : 'D. MMMM YYYY H:mm',
  83. LLLL : 'dddd, D. MMMM YYYY H:mm'
  84. },
  85. calendar : {
  86. sameDay : '[danas u] LT',
  87. nextDay : '[sutra u] LT',
  88. nextWeek : function () {
  89. switch (this.day()) {
  90. case 0:
  91. return '[u] [nedjelju] [u] LT';
  92. case 3:
  93. return '[u] [srijedu] [u] LT';
  94. case 6:
  95. return '[u] [subotu] [u] LT';
  96. case 1:
  97. case 2:
  98. case 4:
  99. case 5:
  100. return '[u] dddd [u] LT';
  101. }
  102. },
  103. lastDay : '[jučer u] LT',
  104. lastWeek : function () {
  105. switch (this.day()) {
  106. case 0:
  107. case 3:
  108. return '[prošlu] dddd [u] LT';
  109. case 6:
  110. return '[prošle] [subote] [u] LT';
  111. case 1:
  112. case 2:
  113. case 4:
  114. case 5:
  115. return '[prošli] dddd [u] LT';
  116. }
  117. },
  118. sameElse : 'L'
  119. },
  120. relativeTime : {
  121. future : 'za %s',
  122. past : 'prije %s',
  123. s : 'par sekundi',
  124. ss : translate,
  125. m : translate,
  126. mm : translate,
  127. h : translate,
  128. hh : translate,
  129. d : 'dan',
  130. dd : translate,
  131. M : 'mjesec',
  132. MM : translate,
  133. y : 'godinu',
  134. yy : translate
  135. },
  136. dayOfMonthOrdinalParse: /\d{1,2}\./,
  137. ordinal : '%d.',
  138. week : {
  139. dow : 1, // Monday is the first day of the week.
  140. doy : 7 // The week that contains Jan 7th is the first week of the year.
  141. }
  142. });
  143. return bs;
  144. })));