[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

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


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