cscg24-guacamole

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

ne.js (4031B)


      1//! moment.js locale configuration
      2//! locale : Nepalese [ne]
      3//! author : suvash : https://github.com/suvash
      4
      5import moment from '../moment';
      6
      7var symbolMap = {
      8        1: '१',
      9        2: '२',
     10        3: '३',
     11        4: '४',
     12        5: '५',
     13        6: '६',
     14        7: '७',
     15        8: '८',
     16        9: '९',
     17        0: '०',
     18    },
     19    numberMap = {
     20        '१': '1',
     21        '२': '2',
     22        '३': '3',
     23        '४': '4',
     24        '५': '5',
     25        '६': '6',
     26        '७': '7',
     27        '८': '8',
     28        '९': '9',
     29        '०': '0',
     30    };
     31
     32export default moment.defineLocale('ne', {
     33    months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
     34        '_'
     35    ),
     36    monthsShort:
     37        'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
     38            '_'
     39        ),
     40    monthsParseExact: true,
     41    weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
     42        '_'
     43    ),
     44    weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
     45    weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
     46    weekdaysParseExact: true,
     47    longDateFormat: {
     48        LT: 'Aको h:mm बजे',
     49        LTS: 'Aको h:mm:ss बजे',
     50        L: 'DD/MM/YYYY',
     51        LL: 'D MMMM YYYY',
     52        LLL: 'D MMMM YYYY, Aको h:mm बजे',
     53        LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
     54    },
     55    preparse: function (string) {
     56        return string.replace(/[१२३४५६७८९०]/g, function (match) {
     57            return numberMap[match];
     58        });
     59    },
     60    postformat: function (string) {
     61        return string.replace(/\d/g, function (match) {
     62            return symbolMap[match];
     63        });
     64    },
     65    meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
     66    meridiemHour: function (hour, meridiem) {
     67        if (hour === 12) {
     68            hour = 0;
     69        }
     70        if (meridiem === 'राति') {
     71            return hour < 4 ? hour : hour + 12;
     72        } else if (meridiem === 'बिहान') {
     73            return hour;
     74        } else if (meridiem === 'दिउँसो') {
     75            return hour >= 10 ? hour : hour + 12;
     76        } else if (meridiem === 'साँझ') {
     77            return hour + 12;
     78        }
     79    },
     80    meridiem: function (hour, minute, isLower) {
     81        if (hour < 3) {
     82            return 'राति';
     83        } else if (hour < 12) {
     84            return 'बिहान';
     85        } else if (hour < 16) {
     86            return 'दिउँसो';
     87        } else if (hour < 20) {
     88            return 'साँझ';
     89        } else {
     90            return 'राति';
     91        }
     92    },
     93    calendar: {
     94        sameDay: '[आज] LT',
     95        nextDay: '[भोलि] LT',
     96        nextWeek: '[आउँदो] dddd[,] LT',
     97        lastDay: '[हिजो] LT',
     98        lastWeek: '[गएको] dddd[,] LT',
     99        sameElse: 'L',
    100    },
    101    relativeTime: {
    102        future: '%sमा',
    103        past: '%s अगाडि',
    104        s: 'केही क्षण',
    105        ss: '%d सेकेण्ड',
    106        m: 'एक मिनेट',
    107        mm: '%d मिनेट',
    108        h: 'एक घण्टा',
    109        hh: '%d घण्टा',
    110        d: 'एक दिन',
    111        dd: '%d दिन',
    112        M: 'एक महिना',
    113        MM: '%d महिना',
    114        y: 'एक बर्ष',
    115        yy: '%d बर्ष',
    116    },
    117    week: {
    118        dow: 0, // Sunday is the first day of the week.
    119        doy: 6, // The week that contains Jan 6th is the first week of the year.
    120    },
    121});