Node-Red configuration
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

is.js 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. //! moment.js locale configuration
  2. //! locale : Icelandic [is]
  3. //! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
  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 plural(n) {
  12. if (n % 100 === 11) {
  13. return true;
  14. } else if (n % 10 === 1) {
  15. return false;
  16. }
  17. return true;
  18. }
  19. function translate(number, withoutSuffix, key, isFuture) {
  20. var result = number + ' ';
  21. switch (key) {
  22. case 's':
  23. return withoutSuffix || isFuture
  24. ? 'nokkrar sekúndur'
  25. : 'nokkrum sekúndum';
  26. case 'ss':
  27. if (plural(number)) {
  28. return (
  29. result +
  30. (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
  31. );
  32. }
  33. return result + 'sekúnda';
  34. case 'm':
  35. return withoutSuffix ? 'mínúta' : 'mínútu';
  36. case 'mm':
  37. if (plural(number)) {
  38. return (
  39. result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
  40. );
  41. } else if (withoutSuffix) {
  42. return result + 'mínúta';
  43. }
  44. return result + 'mínútu';
  45. case 'hh':
  46. if (plural(number)) {
  47. return (
  48. result +
  49. (withoutSuffix || isFuture
  50. ? 'klukkustundir'
  51. : 'klukkustundum')
  52. );
  53. }
  54. return result + 'klukkustund';
  55. case 'd':
  56. if (withoutSuffix) {
  57. return 'dagur';
  58. }
  59. return isFuture ? 'dag' : 'degi';
  60. case 'dd':
  61. if (plural(number)) {
  62. if (withoutSuffix) {
  63. return result + 'dagar';
  64. }
  65. return result + (isFuture ? 'daga' : 'dögum');
  66. } else if (withoutSuffix) {
  67. return result + 'dagur';
  68. }
  69. return result + (isFuture ? 'dag' : 'degi');
  70. case 'M':
  71. if (withoutSuffix) {
  72. return 'mánuður';
  73. }
  74. return isFuture ? 'mánuð' : 'mánuði';
  75. case 'MM':
  76. if (plural(number)) {
  77. if (withoutSuffix) {
  78. return result + 'mánuðir';
  79. }
  80. return result + (isFuture ? 'mánuði' : 'mánuðum');
  81. } else if (withoutSuffix) {
  82. return result + 'mánuður';
  83. }
  84. return result + (isFuture ? 'mánuð' : 'mánuði');
  85. case 'y':
  86. return withoutSuffix || isFuture ? 'ár' : 'ári';
  87. case 'yy':
  88. if (plural(number)) {
  89. return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
  90. }
  91. return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
  92. }
  93. }
  94. var is = moment.defineLocale('is', {
  95. months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
  96. '_'
  97. ),
  98. monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
  99. weekdays:
  100. 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
  101. '_'
  102. ),
  103. weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
  104. weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
  105. longDateFormat: {
  106. LT: 'H:mm',
  107. LTS: 'H:mm:ss',
  108. L: 'DD.MM.YYYY',
  109. LL: 'D. MMMM YYYY',
  110. LLL: 'D. MMMM YYYY [kl.] H:mm',
  111. LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
  112. },
  113. calendar: {
  114. sameDay: '[í dag kl.] LT',
  115. nextDay: '[á morgun kl.] LT',
  116. nextWeek: 'dddd [kl.] LT',
  117. lastDay: '[í gær kl.] LT',
  118. lastWeek: '[síðasta] dddd [kl.] LT',
  119. sameElse: 'L',
  120. },
  121. relativeTime: {
  122. future: 'eftir %s',
  123. past: 'fyrir %s síðan',
  124. s: translate,
  125. ss: translate,
  126. m: translate,
  127. mm: translate,
  128. h: 'klukkustund',
  129. hh: translate,
  130. d: translate,
  131. dd: translate,
  132. M: translate,
  133. MM: translate,
  134. y: translate,
  135. yy: translate,
  136. },
  137. dayOfMonthOrdinalParse: /\d{1,2}\./,
  138. ordinal: '%d.',
  139. week: {
  140. dow: 1, // Monday is the first day of the week.
  141. doy: 4, // The week that contains Jan 4th is the first week of the year.
  142. },
  143. });
  144. return is;
  145. })));