cscg24-guacamole

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

et.js (3255B)


      1//! moment.js locale configuration
      2//! locale : Estonian [et]
      3//! author : Henry Kehlmann : https://github.com/madhenry
      4//! improvements : Illimar Tambek : https://github.com/ragulka
      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    function processRelativeTime(number, withoutSuffix, key, isFuture) {
     16        var format = {
     17            s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
     18            ss: [number + 'sekundi', number + 'sekundit'],
     19            m: ['ühe minuti', 'üks minut'],
     20            mm: [number + ' minuti', number + ' minutit'],
     21            h: ['ühe tunni', 'tund aega', 'üks tund'],
     22            hh: [number + ' tunni', number + ' tundi'],
     23            d: ['ühe päeva', 'üks päev'],
     24            M: ['kuu aja', 'kuu aega', 'üks kuu'],
     25            MM: [number + ' kuu', number + ' kuud'],
     26            y: ['ühe aasta', 'aasta', 'üks aasta'],
     27            yy: [number + ' aasta', number + ' aastat'],
     28        };
     29        if (withoutSuffix) {
     30            return format[key][2] ? format[key][2] : format[key][1];
     31        }
     32        return isFuture ? format[key][0] : format[key][1];
     33    }
     34
     35    var et = moment.defineLocale('et', {
     36        months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
     37            '_'
     38        ),
     39        monthsShort:
     40            'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
     41        weekdays:
     42            'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
     43                '_'
     44            ),
     45        weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
     46        weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
     47        longDateFormat: {
     48            LT: 'H:mm',
     49            LTS: 'H:mm:ss',
     50            L: 'DD.MM.YYYY',
     51            LL: 'D. MMMM YYYY',
     52            LLL: 'D. MMMM YYYY H:mm',
     53            LLLL: 'dddd, D. MMMM YYYY H:mm',
     54        },
     55        calendar: {
     56            sameDay: '[Täna,] LT',
     57            nextDay: '[Homme,] LT',
     58            nextWeek: '[Järgmine] dddd LT',
     59            lastDay: '[Eile,] LT',
     60            lastWeek: '[Eelmine] dddd LT',
     61            sameElse: 'L',
     62        },
     63        relativeTime: {
     64            future: '%s pärast',
     65            past: '%s tagasi',
     66            s: processRelativeTime,
     67            ss: processRelativeTime,
     68            m: processRelativeTime,
     69            mm: processRelativeTime,
     70            h: processRelativeTime,
     71            hh: processRelativeTime,
     72            d: processRelativeTime,
     73            dd: '%d päeva',
     74            M: processRelativeTime,
     75            MM: processRelativeTime,
     76            y: processRelativeTime,
     77            yy: processRelativeTime,
     78        },
     79        dayOfMonthOrdinalParse: /\d{1,2}\./,
     80        ordinal: '%d.',
     81        week: {
     82            dow: 1, // Monday is the first day of the week.
     83            doy: 4, // The week that contains Jan 4th is the first week of the year.
     84        },
     85    });
     86
     87    return et;
     88
     89})));