[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

   1  //! moment.js locale configuration
   2  //! locale : Croatian [hr]
   3  //! author : Bojan Marković : https://github.com/bmarkovic
   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      function translate(number, withoutSuffix, key) {
  14          var result = number + ' ';
  15          switch (key) {
  16              case 'm':
  17                  return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  18              case 'mm':
  19                  if (number === 1) {
  20                      result += 'minuta';
  21                  } else if (number === 2 || number === 3 || number === 4) {
  22                      result += 'minute';
  23                  } else {
  24                      result += 'minuta';
  25                  }
  26                  return result;
  27              case 'h':
  28                  return withoutSuffix ? 'jedan sat' : 'jednog sata';
  29              case 'hh':
  30                  if (number === 1) {
  31                      result += 'sat';
  32                  } else if (number === 2 || number === 3 || number === 4) {
  33                      result += 'sata';
  34                  } else {
  35                      result += 'sati';
  36                  }
  37                  return result;
  38              case 'dd':
  39                  if (number === 1) {
  40                      result += 'dan';
  41                  } else {
  42                      result += 'dana';
  43                  }
  44                  return result;
  45              case 'MM':
  46                  if (number === 1) {
  47                      result += 'mjesec';
  48                  } else if (number === 2 || number === 3 || number === 4) {
  49                      result += 'mjeseca';
  50                  } else {
  51                      result += 'mjeseci';
  52                  }
  53                  return result;
  54              case 'yy':
  55                  if (number === 1) {
  56                      result += 'godina';
  57                  } else if (number === 2 || number === 3 || number === 4) {
  58                      result += 'godine';
  59                  } else {
  60                      result += 'godina';
  61                  }
  62                  return result;
  63          }
  64      }
  65  
  66      var hr = moment.defineLocale('hr', {
  67          months : {
  68              format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),
  69              standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')
  70          },
  71          monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),
  72          monthsParseExact: true,
  73          weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
  74          weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  75          weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),
  76          weekdaysParseExact : true,
  77          longDateFormat : {
  78              LT : 'H:mm',
  79              LTS : 'H:mm:ss',
  80              L : 'DD.MM.YYYY',
  81              LL : 'D. MMMM YYYY',
  82              LLL : 'D. MMMM YYYY H:mm',
  83              LLLL : 'dddd, D. MMMM YYYY H:mm'
  84          },
  85          calendar : {
  86              sameDay  : '[danas u] LT',
  87              nextDay  : '[sutra u] LT',
  88              nextWeek : function () {
  89                  switch (this.day()) {
  90                      case 0:
  91                          return '[u] [nedjelju] [u] LT';
  92                      case 3:
  93                          return '[u] [srijedu] [u] LT';
  94                      case 6:
  95                          return '[u] [subotu] [u] LT';
  96                      case 1:
  97                      case 2:
  98                      case 4:
  99                      case 5:
 100                          return '[u] dddd [u] LT';
 101                  }
 102              },
 103              lastDay  : '[jučer u] LT',
 104              lastWeek : function () {
 105                  switch (this.day()) {
 106                      case 0:
 107                      case 3:
 108                          return '[prošlu] dddd [u] LT';
 109                      case 6:
 110                          return '[prošle] [subote] [u] LT';
 111                      case 1:
 112                      case 2:
 113                      case 4:
 114                      case 5:
 115                          return '[prošli] dddd [u] LT';
 116                  }
 117              },
 118              sameElse : 'L'
 119          },
 120          relativeTime : {
 121              future : 'za %s',
 122              past   : 'prije %s',
 123              s      : 'par sekundi',
 124              m      : translate,
 125              mm     : translate,
 126              h      : translate,
 127              hh     : translate,
 128              d      : 'dan',
 129              dd     : translate,
 130              M      : 'mjesec',
 131              MM     : translate,
 132              y      : 'godinu',
 133              yy     : translate
 134          },
 135          ordinalParse: /\d{1,2}\./,
 136          ordinal : '%d.',
 137          week : {
 138              dow : 1, // Monday is the first day of the week.
 139              doy : 7  // The week that contains Jan 1st is the first week of the year.
 140          }
 141      });
 142  
 143      return hr;
 144  
 145  }));


Generated: Tue Mar 2 01:01:35 2021 Cross-referenced by PHPXref 0.7.1