No Description

sk.js 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'),
  9. monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
  10. function plural(n) {
  11. return (n > 1) && (n < 5);
  12. }
  13. function translate(number, withoutSuffix, key, isFuture) {
  14. var result = number + ' ';
  15. switch (key) {
  16. case 's': // a few seconds / in a few seconds / a few seconds ago
  17. return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
  18. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  19. if (withoutSuffix || isFuture) {
  20. return result + (plural(number) ? 'sekundy' : 'sekúnd');
  21. } else {
  22. return result + 'sekundami';
  23. }
  24. break;
  25. case 'm': // a minute / in a minute / a minute ago
  26. return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
  27. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  28. if (withoutSuffix || isFuture) {
  29. return result + (plural(number) ? 'minúty' : 'minút');
  30. } else {
  31. return result + 'minútami';
  32. }
  33. break;
  34. case 'h': // an hour / in an hour / an hour ago
  35. return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
  36. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  37. if (withoutSuffix || isFuture) {
  38. return result + (plural(number) ? 'hodiny' : 'hodín');
  39. } else {
  40. return result + 'hodinami';
  41. }
  42. break;
  43. case 'd': // a day / in a day / a day ago
  44. return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
  45. case 'dd': // 9 days / in 9 days / 9 days ago
  46. if (withoutSuffix || isFuture) {
  47. return result + (plural(number) ? 'dni' : 'dní');
  48. } else {
  49. return result + 'dňami';
  50. }
  51. break;
  52. case 'M': // a month / in a month / a month ago
  53. return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
  54. case 'MM': // 9 months / in 9 months / 9 months ago
  55. if (withoutSuffix || isFuture) {
  56. return result + (plural(number) ? 'mesiace' : 'mesiacov');
  57. } else {
  58. return result + 'mesiacmi';
  59. }
  60. break;
  61. case 'y': // a year / in a year / a year ago
  62. return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
  63. case 'yy': // 9 years / in 9 years / 9 years ago
  64. if (withoutSuffix || isFuture) {
  65. return result + (plural(number) ? 'roky' : 'rokov');
  66. } else {
  67. return result + 'rokmi';
  68. }
  69. break;
  70. }
  71. }
  72. var sk = moment.defineLocale('sk', {
  73. months : months,
  74. monthsShort : monthsShort,
  75. weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
  76. weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'),
  77. weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'),
  78. longDateFormat : {
  79. LT: 'H:mm',
  80. LTS : 'H:mm:ss',
  81. L : 'DD.MM.YYYY',
  82. LL : 'D. MMMM YYYY',
  83. LLL : 'D. MMMM YYYY H:mm',
  84. LLLL : 'dddd D. MMMM YYYY H:mm'
  85. },
  86. calendar : {
  87. sameDay: '[dnes o] LT',
  88. nextDay: '[zajtra o] LT',
  89. nextWeek: function () {
  90. switch (this.day()) {
  91. case 0:
  92. return '[v nedeľu o] LT';
  93. case 1:
  94. case 2:
  95. return '[v] dddd [o] LT';
  96. case 3:
  97. return '[v stredu o] LT';
  98. case 4:
  99. return '[vo štvrtok o] LT';
  100. case 5:
  101. return '[v piatok o] LT';
  102. case 6:
  103. return '[v sobotu o] LT';
  104. }
  105. },
  106. lastDay: '[včera o] LT',
  107. lastWeek: function () {
  108. switch (this.day()) {
  109. case 0:
  110. return '[minulú nedeľu o] LT';
  111. case 1:
  112. case 2:
  113. return '[minulý] dddd [o] LT';
  114. case 3:
  115. return '[minulú stredu o] LT';
  116. case 4:
  117. case 5:
  118. return '[minulý] dddd [o] LT';
  119. case 6:
  120. return '[minulú sobotu o] LT';
  121. }
  122. },
  123. sameElse: 'L'
  124. },
  125. relativeTime : {
  126. future : 'za %s',
  127. past : 'pred %s',
  128. s : translate,
  129. ss : translate,
  130. m : translate,
  131. mm : translate,
  132. h : translate,
  133. hh : translate,
  134. d : translate,
  135. dd : translate,
  136. M : translate,
  137. MM : translate,
  138. y : translate,
  139. yy : translate
  140. },
  141. dayOfMonthOrdinalParse: /\d{1,2}\./,
  142. ordinal : '%d.',
  143. week : {
  144. dow : 1, // Monday is the first day of the week.
  145. doy : 4 // The week that contains Jan 4th is the first week of the year.
  146. }
  147. });
  148. return sk;
  149. })));