[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

   1  //! moment.js locale configuration
   2  //! locale : Montenegrin [me]
   3  //! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac
   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 translator = {
  14          words: { //Different grammatical cases
  15              m: ['jedan minut', 'jednog minuta'],
  16              mm: ['minut', 'minuta', 'minuta'],
  17              h: ['jedan sat', 'jednog sata'],
  18              hh: ['sat', 'sata', 'sati'],
  19              dd: ['dan', 'dana', 'dana'],
  20              MM: ['mjesec', 'mjeseca', 'mjeseci'],
  21              yy: ['godina', 'godine', 'godina']
  22          },
  23          correctGrammaticalCase: function (number, wordKey) {
  24              return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
  25          },
  26          translate: function (number, withoutSuffix, key) {
  27              var wordKey = translator.words[key];
  28              if (key.length === 1) {
  29                  return withoutSuffix ? wordKey[0] : wordKey[1];
  30              } else {
  31                  return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
  32              }
  33          }
  34      };
  35  
  36      var me = moment.defineLocale('me', {
  37          months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
  38          monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
  39          monthsParseExact : true,
  40          weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
  41          weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  42          weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  43          weekdaysParseExact : true,
  44          longDateFormat: {
  45              LT: 'H:mm',
  46              LTS : 'H:mm:ss',
  47              L: 'DD.MM.YYYY',
  48              LL: 'D. MMMM YYYY',
  49              LLL: 'D. MMMM YYYY H:mm',
  50              LLLL: 'dddd, D. MMMM YYYY H:mm'
  51          },
  52          calendar: {
  53              sameDay: '[danas u] LT',
  54              nextDay: '[sjutra u] LT',
  55  
  56              nextWeek: function () {
  57                  switch (this.day()) {
  58                      case 0:
  59                          return '[u] [nedjelju] [u] LT';
  60                      case 3:
  61                          return '[u] [srijedu] [u] LT';
  62                      case 6:
  63                          return '[u] [subotu] [u] LT';
  64                      case 1:
  65                      case 2:
  66                      case 4:
  67                      case 5:
  68                          return '[u] dddd [u] LT';
  69                  }
  70              },
  71              lastDay  : '[juče u] LT',
  72              lastWeek : function () {
  73                  var lastWeekDays = [
  74                      '[prošle] [nedjelje] [u] LT',
  75                      '[prošlog] [ponedjeljka] [u] LT',
  76                      '[prošlog] [utorka] [u] LT',
  77                      '[prošle] [srijede] [u] LT',
  78                      '[prošlog] [četvrtka] [u] LT',
  79                      '[prošlog] [petka] [u] LT',
  80                      '[prošle] [subote] [u] LT'
  81                  ];
  82                  return lastWeekDays[this.day()];
  83              },
  84              sameElse : 'L'
  85          },
  86          relativeTime : {
  87              future : 'za %s',
  88              past   : 'prije %s',
  89              s      : 'nekoliko sekundi',
  90              m      : translator.translate,
  91              mm     : translator.translate,
  92              h      : translator.translate,
  93              hh     : translator.translate,
  94              d      : 'dan',
  95              dd     : translator.translate,
  96              M      : 'mjesec',
  97              MM     : translator.translate,
  98              y      : 'godinu',
  99              yy     : translator.translate
 100          },
 101          ordinalParse: /\d{1,2}\./,
 102          ordinal : '%d.',
 103          week : {
 104              dow : 1, // Monday is the first day of the week.
 105              doy : 7  // The week that contains Jan 1st is the first week of the year.
 106          }
 107      });
 108  
 109      return me;
 110  
 111  }));


Generated: Fri Feb 26 01:01:36 2021 Cross-referenced by PHPXref 0.7.1