cscg24-guacamole

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

km.js (4090B)


      1//! moment.js locale configuration
      2//! locale : Cambodian [km]
      3//! author : Kruy Vanna : https://github.com/kruyvanna
      4
      5;(function (global, factory) {
      6   typeof exports === 'object' && typeof module !== 'undefined'
      7       && typeof require === 'function' ? factory(require('../moment')) :
      8   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
      9   factory(global.moment)
     10}(this, (function (moment) { 'use strict';
     11
     12    //! moment.js locale configuration
     13
     14    var symbolMap = {
     15            1: '១',
     16            2: '២',
     17            3: '៣',
     18            4: '៤',
     19            5: '៥',
     20            6: '៦',
     21            7: '៧',
     22            8: '៨',
     23            9: '៩',
     24            0: '០',
     25        },
     26        numberMap = {
     27            '១': '1',
     28            '២': '2',
     29            '៣': '3',
     30            '៤': '4',
     31            '៥': '5',
     32            '៦': '6',
     33            '៧': '7',
     34            '៨': '8',
     35            '៩': '9',
     36            '០': '0',
     37        };
     38
     39    var km = moment.defineLocale('km', {
     40        months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
     41            '_'
     42        ),
     43        monthsShort:
     44            'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
     45                '_'
     46            ),
     47        weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
     48        weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
     49        weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
     50        weekdaysParseExact: true,
     51        longDateFormat: {
     52            LT: 'HH:mm',
     53            LTS: 'HH:mm:ss',
     54            L: 'DD/MM/YYYY',
     55            LL: 'D MMMM YYYY',
     56            LLL: 'D MMMM YYYY HH:mm',
     57            LLLL: 'dddd, D MMMM YYYY HH:mm',
     58        },
     59        meridiemParse: /ព្រឹក|ល្ងាច/,
     60        isPM: function (input) {
     61            return input === 'ល្ងាច';
     62        },
     63        meridiem: function (hour, minute, isLower) {
     64            if (hour < 12) {
     65                return 'ព្រឹក';
     66            } else {
     67                return 'ល្ងាច';
     68            }
     69        },
     70        calendar: {
     71            sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
     72            nextDay: '[ស្អែក ម៉ោង] LT',
     73            nextWeek: 'dddd [ម៉ោង] LT',
     74            lastDay: '[ម្សិលមិញ ម៉ោង] LT',
     75            lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
     76            sameElse: 'L',
     77        },
     78        relativeTime: {
     79            future: '%sទៀត',
     80            past: '%sមុន',
     81            s: 'ប៉ុន្មានវិនាទី',
     82            ss: '%d វិនាទី',
     83            m: 'មួយនាទី',
     84            mm: '%d នាទី',
     85            h: 'មួយម៉ោង',
     86            hh: '%d ម៉ោង',
     87            d: 'មួយថ្ងៃ',
     88            dd: '%d ថ្ងៃ',
     89            M: 'មួយខែ',
     90            MM: '%d ខែ',
     91            y: 'មួយឆ្នាំ',
     92            yy: '%d ឆ្នាំ',
     93        },
     94        dayOfMonthOrdinalParse: /ទី\d{1,2}/,
     95        ordinal: 'ទី%d',
     96        preparse: function (string) {
     97            return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
     98                return numberMap[match];
     99            });
    100        },
    101        postformat: function (string) {
    102            return string.replace(/\d/g, function (match) {
    103                return symbolMap[match];
    104            });
    105        },
    106        week: {
    107            dow: 1, // Monday is the first day of the week.
    108            doy: 4, // The week that contains Jan 4th is the first week of the year.
    109        },
    110    });
    111
    112    return km;
    113
    114})));