[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-core/js/vendor/moment-js/locale/ -> sk.js (source)

   1  //! moment.js locale configuration
   2  //! locale : Slovak [sk]
   3  //! author : Martin Minka : https://github.com/k2s
   4  //! based on work of petrbela : https://github.com/petrbela
   5  
   6  ;(function (global, factory) {
   7     typeof exports === 'object' && typeof module !== 'undefined'
   8         && typeof require === 'function' ? factory(require('../moment')) :
   9     typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  10     factory(global.moment)
  11  }(this, function (moment) { 'use strict';
  12  
  13  
  14      var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'),
  15          monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
  16      function plural(n) {
  17          return (n > 1) && (n < 5);
  18      }
  19      function translate(number, withoutSuffix, key, isFuture) {
  20          var result = number + ' ';
  21          switch (key) {
  22              case 's':  // a few seconds / in a few seconds / a few seconds ago
  23                  return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
  24              case 'm':  // a minute / in a minute / a minute ago
  25                  return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
  26              case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  27                  if (withoutSuffix || isFuture) {
  28                      return result + (plural(number) ? 'minúty' : 'minút');
  29                  } else {
  30                      return result + 'minútami';
  31                  }
  32                  break;
  33              case 'h':  // an hour / in an hour / an hour ago
  34                  return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
  35              case 'hh': // 9 hours / in 9 hours / 9 hours ago
  36                  if (withoutSuffix || isFuture) {
  37                      return result + (plural(number) ? 'hodiny' : 'hodín');
  38                  } else {
  39                      return result + 'hodinami';
  40                  }
  41                  break;
  42              case 'd':  // a day / in a day / a day ago
  43                  return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
  44              case 'dd': // 9 days / in 9 days / 9 days ago
  45                  if (withoutSuffix || isFuture) {
  46                      return result + (plural(number) ? 'dni' : 'dní');
  47                  } else {
  48                      return result + 'dňami';
  49                  }
  50                  break;
  51              case 'M':  // a month / in a month / a month ago
  52                  return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
  53              case 'MM': // 9 months / in 9 months / 9 months ago
  54                  if (withoutSuffix || isFuture) {
  55                      return result + (plural(number) ? 'mesiace' : 'mesiacov');
  56                  } else {
  57                      return result + 'mesiacmi';
  58                  }
  59                  break;
  60              case 'y':  // a year / in a year / a year ago
  61                  return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
  62              case 'yy': // 9 years / in 9 years / 9 years ago
  63                  if (withoutSuffix || isFuture) {
  64                      return result + (plural(number) ? 'roky' : 'rokov');
  65                  } else {
  66                      return result + 'rokmi';
  67                  }
  68                  break;
  69          }
  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              m : translate,
 130              mm : translate,
 131              h : translate,
 132              hh : translate,
 133              d : translate,
 134              dd : translate,
 135              M : translate,
 136              MM : translate,
 137              y : translate,
 138              yy : translate
 139          },
 140          ordinalParse: /\d{1,2}\./,
 141          ordinal : '%d.',
 142          week : {
 143              dow : 1, // Monday is the first day of the week.
 144              doy : 4  // The week that contains Jan 4th is the first week of the year.
 145          }
 146      });
 147  
 148      return sk;
 149  
 150  }));


Generated: Wed Feb 24 01:01:36 2021 Cross-referenced by PHPXref 0.7.1