1 // moment.js locale configuration
2 // locale : Lithuanian (lt)
3 // author : Mindaugas Mozūras : https://github.com/mmozuras
6 if (typeof define === 'function' && define.amd) {
7 define(['moment'], factory); // AMD
8 } else if (typeof exports === 'object') {
9 module.exports = factory(require('../moment')); // Node
11 factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
15 'm' : 'minutė_minutės_minutę',
16 'mm': 'minutės_minučių_minutes',
17 'h' : 'valanda_valandos_valandą',
18 'hh': 'valandos_valandų_valandas',
19 'd' : 'diena_dienos_dieną',
20 'dd': 'dienos_dienų_dienas',
21 'M' : 'mėnuo_mėnesio_mėnesį',
22 'MM': 'mėnesiai_mėnesių_mėnesius',
23 'y' : 'metai_metų_metus',
24 'yy': 'metai_metų_metus'
26 weekDays = 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_');
28 function translateSeconds(number, withoutSuffix, key, isFuture) {
30 return 'kelios sekundės';
32 return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
36 function translateSingular(number, withoutSuffix, key, isFuture) {
37 return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
40 function special(number) {
41 return number % 10 === 0 || (number > 10 && number < 20);
45 return units[key].split('_');
48 function translate(number, withoutSuffix, key, isFuture) {
49 var result = number + ' ';
51 return result + translateSingular(number, withoutSuffix, key[0], isFuture);
52 } else if (withoutSuffix) {
53 return result + (special(number) ? forms(key)[1] : forms(key)[0]);
56 return result + forms(key)[1];
58 return result + (special(number) ? forms(key)[1] : forms(key)[2]);
63 function relativeWeekDay(moment, format) {
64 var nominative = format.indexOf('dddd HH:mm') === -1,
65 weekDay = weekDays[moment.day()];
67 return nominative ? weekDay : weekDay.substring(0, weekDay.length - 2) + 'į';
70 return moment.defineLocale('lt', {
71 months : 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),
72 monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
73 weekdays : relativeWeekDay,
74 weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
75 weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'),
80 LL : 'YYYY [m.] MMMM D [d.]',
81 LLL : 'YYYY [m.] MMMM D [d.], LT [val.]',
82 LLLL : 'YYYY [m.] MMMM D [d.], dddd, LT [val.]',
84 ll : 'YYYY [m.] MMMM D [d.]',
85 lll : 'YYYY [m.] MMMM D [d.], LT [val.]',
86 llll : 'YYYY [m.] MMMM D [d.], ddd, LT [val.]'
89 sameDay : '[Šiandien] LT',
90 nextDay : '[Rytoj] LT',
92 lastDay : '[Vakar] LT',
93 lastWeek : '[Praėjusį] dddd LT',
100 m : translateSingular,
102 h : translateSingular,
104 d : translateSingular,
106 M : translateSingular,
108 y : translateSingular,
111 ordinalParse: /\d{1,2}-oji/,
112 ordinal : function (number) {
113 return number + '-oji';
116 dow : 1, // Monday is the first day of the week.
117 doy : 4 // The week that contains Jan 4th is the first week of the year.