Node-Red configuration
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

bs.js 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. //! moment.js locale configuration
  2. //! locale : Bosnian [bs]
  3. //! author : Nedim Cholich : https://github.com/frontyard
  4. //! based on (hr) translation by Bojan Marković
  5. ;(function (global, factory) {
  6. typeof exports === 'object' && typeof module !== 'undefined'
  7. && typeof require === 'function' ? factory(require('../moment')) :
  8. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  9. factory(global.moment)
  10. }(this, (function (moment) { 'use strict';
  11. //! moment.js locale configuration
  12. function translate(number, withoutSuffix, key) {
  13. var result = number + ' ';
  14. switch (key) {
  15. case 'ss':
  16. if (number === 1) {
  17. result += 'sekunda';
  18. } else if (number === 2 || number === 3 || number === 4) {
  19. result += 'sekunde';
  20. } else {
  21. result += 'sekundi';
  22. }
  23. return result;
  24. case 'm':
  25. return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  26. case 'mm':
  27. if (number === 1) {
  28. result += 'minuta';
  29. } else if (number === 2 || number === 3 || number === 4) {
  30. result += 'minute';
  31. } else {
  32. result += 'minuta';
  33. }
  34. return result;
  35. case 'h':
  36. return withoutSuffix ? 'jedan sat' : 'jednog sata';
  37. case 'hh':
  38. if (number === 1) {
  39. result += 'sat';
  40. } else if (number === 2 || number === 3 || number === 4) {
  41. result += 'sata';
  42. } else {
  43. result += 'sati';
  44. }
  45. return result;
  46. case 'dd':
  47. if (number === 1) {
  48. result += 'dan';
  49. } else {
  50. result += 'dana';
  51. }
  52. return result;
  53. case 'MM':
  54. if (number === 1) {
  55. result += 'mjesec';
  56. } else if (number === 2 || number === 3 || number === 4) {
  57. result += 'mjeseca';
  58. } else {
  59. result += 'mjeseci';
  60. }
  61. return result;
  62. case 'yy':
  63. if (number === 1) {
  64. result += 'godina';
  65. } else if (number === 2 || number === 3 || number === 4) {
  66. result += 'godine';
  67. } else {
  68. result += 'godina';
  69. }
  70. return result;
  71. }
  72. }
  73. var bs = moment.defineLocale('bs', {
  74. months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
  75. '_'
  76. ),
  77. monthsShort:
  78. 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
  79. '_'
  80. ),
  81. monthsParseExact: true,
  82. weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
  83. '_'
  84. ),
  85. weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  86. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  87. weekdaysParseExact: true,
  88. longDateFormat: {
  89. LT: 'H:mm',
  90. LTS: 'H:mm:ss',
  91. L: 'DD.MM.YYYY',
  92. LL: 'D. MMMM YYYY',
  93. LLL: 'D. MMMM YYYY H:mm',
  94. LLLL: 'dddd, D. MMMM YYYY H:mm',
  95. },
  96. calendar: {
  97. sameDay: '[danas u] LT',
  98. nextDay: '[sutra u] LT',
  99. nextWeek: function () {
  100. switch (this.day()) {
  101. case 0:
  102. return '[u] [nedjelju] [u] LT';
  103. case 3:
  104. return '[u] [srijedu] [u] LT';
  105. case 6:
  106. return '[u] [subotu] [u] LT';
  107. case 1:
  108. case 2:
  109. case 4:
  110. case 5:
  111. return '[u] dddd [u] LT';
  112. }
  113. },
  114. lastDay: '[jučer u] LT',
  115. lastWeek: function () {
  116. switch (this.day()) {
  117. case 0:
  118. case 3:
  119. return '[prošlu] dddd [u] LT';
  120. case 6:
  121. return '[prošle] [subote] [u] LT';
  122. case 1:
  123. case 2:
  124. case 4:
  125. case 5:
  126. return '[prošli] dddd [u] LT';
  127. }
  128. },
  129. sameElse: 'L',
  130. },
  131. relativeTime: {
  132. future: 'za %s',
  133. past: 'prije %s',
  134. s: 'par sekundi',
  135. ss: translate,
  136. m: translate,
  137. mm: translate,
  138. h: translate,
  139. hh: translate,
  140. d: 'dan',
  141. dd: translate,
  142. M: 'mjesec',
  143. MM: translate,
  144. y: 'godinu',
  145. yy: translate,
  146. },
  147. dayOfMonthOrdinalParse: /\d{1,2}\./,
  148. ordinal: '%d.',
  149. week: {
  150. dow: 1, // Monday is the first day of the week.
  151. doy: 7, // The week that contains Jan 7th is the first week of the year.
  152. },
  153. });
  154. return bs;
  155. })));