tzl.js (3783B)
1//! moment.js locale configuration 2//! locale : Talossan [tzl] 3//! author : Robin van der Vliet : https://github.com/robin0van0der0v 4//! author : Iustì Canun 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 //! moment.js locale configuration 14 15 // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. 16 // This is currently too difficult (maybe even impossible) to add. 17 var tzl = moment.defineLocale('tzl', { 18 months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split( 19 '_' 20 ), 21 monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), 22 weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), 23 weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), 24 weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), 25 longDateFormat: { 26 LT: 'HH.mm', 27 LTS: 'HH.mm.ss', 28 L: 'DD.MM.YYYY', 29 LL: 'D. MMMM [dallas] YYYY', 30 LLL: 'D. MMMM [dallas] YYYY HH.mm', 31 LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm', 32 }, 33 meridiemParse: /d\'o|d\'a/i, 34 isPM: function (input) { 35 return "d'o" === input.toLowerCase(); 36 }, 37 meridiem: function (hours, minutes, isLower) { 38 if (hours > 11) { 39 return isLower ? "d'o" : "D'O"; 40 } else { 41 return isLower ? "d'a" : "D'A"; 42 } 43 }, 44 calendar: { 45 sameDay: '[oxhi à] LT', 46 nextDay: '[demà à] LT', 47 nextWeek: 'dddd [à] LT', 48 lastDay: '[ieiri à] LT', 49 lastWeek: '[sür el] dddd [lasteu à] LT', 50 sameElse: 'L', 51 }, 52 relativeTime: { 53 future: 'osprei %s', 54 past: 'ja%s', 55 s: processRelativeTime, 56 ss: processRelativeTime, 57 m: processRelativeTime, 58 mm: processRelativeTime, 59 h: processRelativeTime, 60 hh: processRelativeTime, 61 d: processRelativeTime, 62 dd: processRelativeTime, 63 M: processRelativeTime, 64 MM: processRelativeTime, 65 y: processRelativeTime, 66 yy: processRelativeTime, 67 }, 68 dayOfMonthOrdinalParse: /\d{1,2}\./, 69 ordinal: '%d.', 70 week: { 71 dow: 1, // Monday is the first day of the week. 72 doy: 4, // The week that contains Jan 4th is the first week of the year. 73 }, 74 }); 75 76 function processRelativeTime(number, withoutSuffix, key, isFuture) { 77 var format = { 78 s: ['viensas secunds', "'iensas secunds"], 79 ss: [number + ' secunds', '' + number + ' secunds'], 80 m: ["'n míut", "'iens míut"], 81 mm: [number + ' míuts', '' + number + ' míuts'], 82 h: ["'n þora", "'iensa þora"], 83 hh: [number + ' þoras', '' + number + ' þoras'], 84 d: ["'n ziua", "'iensa ziua"], 85 dd: [number + ' ziuas', '' + number + ' ziuas'], 86 M: ["'n mes", "'iens mes"], 87 MM: [number + ' mesen', '' + number + ' mesen'], 88 y: ["'n ar", "'iens ar"], 89 yy: [number + ' ars', '' + number + ' ars'], 90 }; 91 return isFuture 92 ? format[key][0] 93 : withoutSuffix 94 ? format[key][0] 95 : format[key][1]; 96 } 97 98 return tzl; 99 100})));