[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

   1  //! moment.js locale configuration
   2  //! locale : Lithuanian [lt]
   3  //! author : Mindaugas Mozūras : https://github.com/mmozuras
   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 units = {
  14          'm' : 'minutė_minutės_minutę',
  15          'mm': 'minutės_minučių_minutes',
  16          'h' : 'valanda_valandos_valandą',
  17          'hh': 'valandos_valandų_valandas',
  18          'd' : 'diena_dienos_dieną',
  19          'dd': 'dienos_dienų_dienas',
  20          'M' : 'mėnuo_mėnesio_mėnesį',
  21          'MM': 'mėnesiai_mėnesių_mėnesius',
  22          'y' : 'metai_metų_metus',
  23          'yy': 'metai_metų_metus'
  24      };
  25      function translateSeconds(number, withoutSuffix, key, isFuture) {
  26          if (withoutSuffix) {
  27              return 'kelios sekundės';
  28          } else {
  29              return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
  30          }
  31      }
  32      function translateSingular(number, withoutSuffix, key, isFuture) {
  33          return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
  34      }
  35      function special(number) {
  36          return number % 10 === 0 || (number > 10 && number < 20);
  37      }
  38      function forms(key) {
  39          return units[key].split('_');
  40      }
  41      function translate(number, withoutSuffix, key, isFuture) {
  42          var result = number + ' ';
  43          if (number === 1) {
  44              return result + translateSingular(number, withoutSuffix, key[0], isFuture);
  45          } else if (withoutSuffix) {
  46              return result + (special(number) ? forms(key)[1] : forms(key)[0]);
  47          } else {
  48              if (isFuture) {
  49                  return result + forms(key)[1];
  50              } else {
  51                  return result + (special(number) ? forms(key)[1] : forms(key)[2]);
  52              }
  53          }
  54      }
  55      var lt = moment.defineLocale('lt', {
  56          months : {
  57              format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),
  58              standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
  59              isFormat: /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?|MMMM?(\[[^\[\]]*\]|\s+)+D[oD]?/
  60          },
  61          monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
  62          weekdays : {
  63              format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),
  64              standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),
  65              isFormat: /dddd HH:mm/
  66          },
  67          weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
  68          weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'),
  69          weekdaysParseExact : true,
  70          longDateFormat : {
  71              LT : 'HH:mm',
  72              LTS : 'HH:mm:ss',
  73              L : 'YYYY-MM-DD',
  74              LL : 'YYYY [m.] MMMM D [d.]',
  75              LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  76              LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
  77              l : 'YYYY-MM-DD',
  78              ll : 'YYYY [m.] MMMM D [d.]',
  79              lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  80              llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'
  81          },
  82          calendar : {
  83              sameDay : '[Šiandien] LT',
  84              nextDay : '[Rytoj] LT',
  85              nextWeek : 'dddd LT',
  86              lastDay : '[Vakar] LT',
  87              lastWeek : '[Praėjusį] dddd LT',
  88              sameElse : 'L'
  89          },
  90          relativeTime : {
  91              future : 'po %s',
  92              past : 'prieš %s',
  93              s : translateSeconds,
  94              m : translateSingular,
  95              mm : translate,
  96              h : translateSingular,
  97              hh : translate,
  98              d : translateSingular,
  99              dd : translate,
 100              M : translateSingular,
 101              MM : translate,
 102              y : translateSingular,
 103              yy : translate
 104          },
 105          ordinalParse: /\d{1,2}-oji/,
 106          ordinal : function (number) {
 107              return number + '-oji';
 108          },
 109          week : {
 110              dow : 1, // Monday is the first day of the week.
 111              doy : 4  // The week that contains Jan 4th is the first week of the year.
 112          }
 113      });
 114  
 115      return lt;
 116  
 117  }));


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