cscg24-guacamole

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

gom-latn.js (4130B)


      1//! moment.js locale configuration
      2//! locale : Konkani Latin script [gom-latn]
      3//! author : The Discoverer : https://github.com/WikiDiscoverer
      4
      5import moment from '../moment';
      6
      7function processRelativeTime(number, withoutSuffix, key, isFuture) {
      8    var format = {
      9        s: ['thoddea sekondamni', 'thodde sekond'],
     10        ss: [number + ' sekondamni', number + ' sekond'],
     11        m: ['eka mintan', 'ek minut'],
     12        mm: [number + ' mintamni', number + ' mintam'],
     13        h: ['eka voran', 'ek vor'],
     14        hh: [number + ' voramni', number + ' voram'],
     15        d: ['eka disan', 'ek dis'],
     16        dd: [number + ' disamni', number + ' dis'],
     17        M: ['eka mhoinean', 'ek mhoino'],
     18        MM: [number + ' mhoineamni', number + ' mhoine'],
     19        y: ['eka vorsan', 'ek voros'],
     20        yy: [number + ' vorsamni', number + ' vorsam'],
     21    };
     22    return isFuture ? format[key][0] : format[key][1];
     23}
     24
     25export default moment.defineLocale('gom-latn', {
     26    months: {
     27        standalone:
     28            'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
     29                '_'
     30            ),
     31        format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
     32            '_'
     33        ),
     34        isFormat: /MMMM(\s)+D[oD]?/,
     35    },
     36    monthsShort:
     37        'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
     38    monthsParseExact: true,
     39    weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
     40    weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
     41    weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
     42    weekdaysParseExact: true,
     43    longDateFormat: {
     44        LT: 'A h:mm [vazta]',
     45        LTS: 'A h:mm:ss [vazta]',
     46        L: 'DD-MM-YYYY',
     47        LL: 'D MMMM YYYY',
     48        LLL: 'D MMMM YYYY A h:mm [vazta]',
     49        LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
     50        llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
     51    },
     52    calendar: {
     53        sameDay: '[Aiz] LT',
     54        nextDay: '[Faleam] LT',
     55        nextWeek: '[Fuddlo] dddd[,] LT',
     56        lastDay: '[Kal] LT',
     57        lastWeek: '[Fattlo] dddd[,] LT',
     58        sameElse: 'L',
     59    },
     60    relativeTime: {
     61        future: '%s',
     62        past: '%s adim',
     63        s: processRelativeTime,
     64        ss: processRelativeTime,
     65        m: processRelativeTime,
     66        mm: processRelativeTime,
     67        h: processRelativeTime,
     68        hh: processRelativeTime,
     69        d: processRelativeTime,
     70        dd: processRelativeTime,
     71        M: processRelativeTime,
     72        MM: processRelativeTime,
     73        y: processRelativeTime,
     74        yy: processRelativeTime,
     75    },
     76    dayOfMonthOrdinalParse: /\d{1,2}(er)/,
     77    ordinal: function (number, period) {
     78        switch (period) {
     79            // the ordinal 'er' only applies to day of the month
     80            case 'D':
     81                return number + 'er';
     82            default:
     83            case 'M':
     84            case 'Q':
     85            case 'DDD':
     86            case 'd':
     87            case 'w':
     88            case 'W':
     89                return number;
     90        }
     91    },
     92    week: {
     93        dow: 0, // Sunday is the first day of the week
     94        doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
     95    },
     96    meridiemParse: /rati|sokallim|donparam|sanje/,
     97    meridiemHour: function (hour, meridiem) {
     98        if (hour === 12) {
     99            hour = 0;
    100        }
    101        if (meridiem === 'rati') {
    102            return hour < 4 ? hour : hour + 12;
    103        } else if (meridiem === 'sokallim') {
    104            return hour;
    105        } else if (meridiem === 'donparam') {
    106            return hour > 12 ? hour : hour + 12;
    107        } else if (meridiem === 'sanje') {
    108            return hour + 12;
    109        }
    110    },
    111    meridiem: function (hour, minute, isLower) {
    112        if (hour < 4) {
    113            return 'rati';
    114        } else if (hour < 12) {
    115            return 'sokallim';
    116        } else if (hour < 16) {
    117            return 'donparam';
    118        } else if (hour < 20) {
    119            return 'sanje';
    120        } else {
    121            return 'rati';
    122        }
    123    },
    124});