cscg24-guacamole

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

cy.js (3542B)


      1//! moment.js locale configuration
      2//! locale : Welsh [cy]
      3//! author : Robert Allen : https://github.com/robgallen
      4//! author : https://github.com/ryangreaves
      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    var cy = moment.defineLocale('cy', {
     16        months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
     17            '_'
     18        ),
     19        monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
     20            '_'
     21        ),
     22        weekdays:
     23            'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
     24                '_'
     25            ),
     26        weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
     27        weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
     28        weekdaysParseExact: true,
     29        // time formats are the same as en-gb
     30        longDateFormat: {
     31            LT: 'HH:mm',
     32            LTS: 'HH:mm:ss',
     33            L: 'DD/MM/YYYY',
     34            LL: 'D MMMM YYYY',
     35            LLL: 'D MMMM YYYY HH:mm',
     36            LLLL: 'dddd, D MMMM YYYY HH:mm',
     37        },
     38        calendar: {
     39            sameDay: '[Heddiw am] LT',
     40            nextDay: '[Yfory am] LT',
     41            nextWeek: 'dddd [am] LT',
     42            lastDay: '[Ddoe am] LT',
     43            lastWeek: 'dddd [diwethaf am] LT',
     44            sameElse: 'L',
     45        },
     46        relativeTime: {
     47            future: 'mewn %s',
     48            past: '%s yn ôl',
     49            s: 'ychydig eiliadau',
     50            ss: '%d eiliad',
     51            m: 'munud',
     52            mm: '%d munud',
     53            h: 'awr',
     54            hh: '%d awr',
     55            d: 'diwrnod',
     56            dd: '%d diwrnod',
     57            M: 'mis',
     58            MM: '%d mis',
     59            y: 'blwyddyn',
     60            yy: '%d flynedd',
     61        },
     62        dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
     63        // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
     64        ordinal: function (number) {
     65            var b = number,
     66                output = '',
     67                lookup = [
     68                    '',
     69                    'af',
     70                    'il',
     71                    'ydd',
     72                    'ydd',
     73                    'ed',
     74                    'ed',
     75                    'ed',
     76                    'fed',
     77                    'fed',
     78                    'fed', // 1af to 10fed
     79                    'eg',
     80                    'fed',
     81                    'eg',
     82                    'eg',
     83                    'fed',
     84                    'eg',
     85                    'eg',
     86                    'fed',
     87                    'eg',
     88                    'fed', // 11eg to 20fed
     89                ];
     90            if (b > 20) {
     91                if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
     92                    output = 'fed'; // not 30ain, 70ain or 90ain
     93                } else {
     94                    output = 'ain';
     95                }
     96            } else if (b > 0) {
     97                output = lookup[b];
     98            }
     99            return number + output;
    100        },
    101        week: {
    102            dow: 1, // Monday is the first day of the week.
    103            doy: 4, // The week that contains Jan 4th is the first week of the year.
    104        },
    105    });
    106
    107    return cy;
    108
    109})));