cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

tzl.js (3113B)


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