[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

   1  //! moment.js locale configuration
   2  //! locale : Icelandic [is]
   3  //! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
   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 plural(n) {
  14          if (n % 100 === 11) {
  15              return true;
  16          } else if (n % 10 === 1) {
  17              return false;
  18          }
  19          return true;
  20      }
  21      function translate(number, withoutSuffix, key, isFuture) {
  22          var result = number + ' ';
  23          switch (key) {
  24              case 's':
  25                  return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';
  26              case 'm':
  27                  return withoutSuffix ? 'mínúta' : 'mínútu';
  28              case 'mm':
  29                  if (plural(number)) {
  30                      return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');
  31                  } else if (withoutSuffix) {
  32                      return result + 'mínúta';
  33                  }
  34                  return result + 'mínútu';
  35              case 'hh':
  36                  if (plural(number)) {
  37                      return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');
  38                  }
  39                  return result + 'klukkustund';
  40              case 'd':
  41                  if (withoutSuffix) {
  42                      return 'dagur';
  43                  }
  44                  return isFuture ? 'dag' : 'degi';
  45              case 'dd':
  46                  if (plural(number)) {
  47                      if (withoutSuffix) {
  48                          return result + 'dagar';
  49                      }
  50                      return result + (isFuture ? 'daga' : 'dögum');
  51                  } else if (withoutSuffix) {
  52                      return result + 'dagur';
  53                  }
  54                  return result + (isFuture ? 'dag' : 'degi');
  55              case 'M':
  56                  if (withoutSuffix) {
  57                      return 'mánuður';
  58                  }
  59                  return isFuture ? 'mánuð' : 'mánuði';
  60              case 'MM':
  61                  if (plural(number)) {
  62                      if (withoutSuffix) {
  63                          return result + 'mánuðir';
  64                      }
  65                      return result + (isFuture ? 'mánuði' : 'mánuðum');
  66                  } else if (withoutSuffix) {
  67                      return result + 'mánuður';
  68                  }
  69                  return result + (isFuture ? 'mánuð' : 'mánuði');
  70              case 'y':
  71                  return withoutSuffix || isFuture ? 'ár' : 'ári';
  72              case 'yy':
  73                  if (plural(number)) {
  74                      return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
  75                  }
  76                  return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
  77          }
  78      }
  79  
  80      var is = moment.defineLocale('is', {
  81          months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'),
  82          monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
  83          weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'),
  84          weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
  85          weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
  86          longDateFormat : {
  87              LT : 'H:mm',
  88              LTS : 'H:mm:ss',
  89              L : 'DD.MM.YYYY',
  90              LL : 'D. MMMM YYYY',
  91              LLL : 'D. MMMM YYYY [kl.] H:mm',
  92              LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm'
  93          },
  94          calendar : {
  95              sameDay : '[í dag kl.] LT',
  96              nextDay : '[á morgun kl.] LT',
  97              nextWeek : 'dddd [kl.] LT',
  98              lastDay : '[í gær kl.] LT',
  99              lastWeek : '[síðasta] dddd [kl.] LT',
 100              sameElse : 'L'
 101          },
 102          relativeTime : {
 103              future : 'eftir %s',
 104              past : 'fyrir %s síðan',
 105              s : translate,
 106              m : translate,
 107              mm : translate,
 108              h : 'klukkustund',
 109              hh : translate,
 110              d : translate,
 111              dd : translate,
 112              M : translate,
 113              MM : translate,
 114              y : translate,
 115              yy : translate
 116          },
 117          ordinalParse: /\d{1,2}\./,
 118          ordinal : '%d.',
 119          week : {
 120              dow : 1, // Monday is the first day of the week.
 121              doy : 4  // The week that contains Jan 4th is the first week of the year.
 122          }
 123      });
 124  
 125      return is;
 126  
 127  }));


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