[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

   1  //! moment.js locale configuration
   2  //! locale : Czech [cs]
   3  //! author : petrbela : https://github.com/petrbela
   4  
   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  
  12  
  13      var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'),
  14          monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
  15      function plural(n) {
  16          return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
  17      }
  18      function translate(number, withoutSuffix, key, isFuture) {
  19          var result = number + ' ';
  20          switch (key) {
  21              case 's':  // a few seconds / in a few seconds / a few seconds ago
  22                  return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
  23              case 'm':  // a minute / in a minute / a minute ago
  24                  return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
  25              case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  26                  if (withoutSuffix || isFuture) {
  27                      return result + (plural(number) ? 'minuty' : 'minut');
  28                  } else {
  29                      return result + 'minutami';
  30                  }
  31                  break;
  32              case 'h':  // an hour / in an hour / an hour ago
  33                  return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
  34              case 'hh': // 9 hours / in 9 hours / 9 hours ago
  35                  if (withoutSuffix || isFuture) {
  36                      return result + (plural(number) ? 'hodiny' : 'hodin');
  37                  } else {
  38                      return result + 'hodinami';
  39                  }
  40                  break;
  41              case 'd':  // a day / in a day / a day ago
  42                  return (withoutSuffix || isFuture) ? 'den' : 'dnem';
  43              case 'dd': // 9 days / in 9 days / 9 days ago
  44                  if (withoutSuffix || isFuture) {
  45                      return result + (plural(number) ? 'dny' : 'dní');
  46                  } else {
  47                      return result + 'dny';
  48                  }
  49                  break;
  50              case 'M':  // a month / in a month / a month ago
  51                  return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
  52              case 'MM': // 9 months / in 9 months / 9 months ago
  53                  if (withoutSuffix || isFuture) {
  54                      return result + (plural(number) ? 'měsíce' : 'měsíců');
  55                  } else {
  56                      return result + 'měsíci';
  57                  }
  58                  break;
  59              case 'y':  // a year / in a year / a year ago
  60                  return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
  61              case 'yy': // 9 years / in 9 years / 9 years ago
  62                  if (withoutSuffix || isFuture) {
  63                      return result + (plural(number) ? 'roky' : 'let');
  64                  } else {
  65                      return result + 'lety';
  66                  }
  67                  break;
  68          }
  69      }
  70  
  71      var cs = moment.defineLocale('cs', {
  72          months : months,
  73          monthsShort : monthsShort,
  74          monthsParse : (function (months, monthsShort) {
  75              var i, _monthsParse = [];
  76              for (i = 0; i < 12; i++) {
  77                  // use custom parser to solve problem with July (červenec)
  78                  _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
  79              }
  80              return _monthsParse;
  81          }(months, monthsShort)),
  82          shortMonthsParse : (function (monthsShort) {
  83              var i, _shortMonthsParse = [];
  84              for (i = 0; i < 12; i++) {
  85                  _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
  86              }
  87              return _shortMonthsParse;
  88          }(monthsShort)),
  89          longMonthsParse : (function (months) {
  90              var i, _longMonthsParse = [];
  91              for (i = 0; i < 12; i++) {
  92                  _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
  93              }
  94              return _longMonthsParse;
  95          }(months)),
  96          weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
  97          weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'),
  98          weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'),
  99          longDateFormat : {
 100              LT: 'H:mm',
 101              LTS : 'H:mm:ss',
 102              L : 'DD.MM.YYYY',
 103              LL : 'D. MMMM YYYY',
 104              LLL : 'D. MMMM YYYY H:mm',
 105              LLLL : 'dddd D. MMMM YYYY H:mm',
 106              l : 'D. M. YYYY'
 107          },
 108          calendar : {
 109              sameDay: '[dnes v] LT',
 110              nextDay: '[zítra v] LT',
 111              nextWeek: function () {
 112                  switch (this.day()) {
 113                      case 0:
 114                          return '[v neděli v] LT';
 115                      case 1:
 116                      case 2:
 117                          return '[v] dddd [v] LT';
 118                      case 3:
 119                          return '[ve středu v] LT';
 120                      case 4:
 121                          return '[ve čtvrtek v] LT';
 122                      case 5:
 123                          return '[v pátek v] LT';
 124                      case 6:
 125                          return '[v sobotu v] LT';
 126                  }
 127              },
 128              lastDay: '[včera v] LT',
 129              lastWeek: function () {
 130                  switch (this.day()) {
 131                      case 0:
 132                          return '[minulou neděli v] LT';
 133                      case 1:
 134                      case 2:
 135                          return '[minulé] dddd [v] LT';
 136                      case 3:
 137                          return '[minulou středu v] LT';
 138                      case 4:
 139                      case 5:
 140                          return '[minulý] dddd [v] LT';
 141                      case 6:
 142                          return '[minulou sobotu v] LT';
 143                  }
 144              },
 145              sameElse: 'L'
 146          },
 147          relativeTime : {
 148              future : 'za %s',
 149              past : 'před %s',
 150              s : translate,
 151              m : translate,
 152              mm : translate,
 153              h : translate,
 154              hh : translate,
 155              d : translate,
 156              dd : translate,
 157              M : translate,
 158              MM : translate,
 159              y : translate,
 160              yy : translate
 161          },
 162          ordinalParse : /\d{1,2}\./,
 163          ordinal : '%d.',
 164          week : {
 165              dow : 1, // Monday is the first day of the week.
 166              doy : 4  // The week that contains Jan 4th is the first week of the year.
 167          }
 168      });
 169  
 170      return cs;
 171  
 172  }));


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