cscg24-guacamole

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

ar-ps.js (4102B)


      1//! moment.js locale configuration
      2//! locale : Arabic (Palestine) [ar-ps]
      3//! author : Majd Al-Shihabi : https://github.com/majdal
      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 arPs = moment.defineLocale('ar-ps', {
     40        months: 'كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل'.split(
     41            '_'
     42        ),
     43        monthsShort:
     44            'ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١'.split('_'),
     45        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
     46        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
     47        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
     48        weekdaysParseExact: true,
     49        longDateFormat: {
     50            LT: 'HH:mm',
     51            LTS: 'HH:mm:ss',
     52            L: 'DD/MM/YYYY',
     53            LL: 'D MMMM YYYY',
     54            LLL: 'D MMMM YYYY HH:mm',
     55            LLLL: 'dddd D MMMM YYYY HH:mm',
     56        },
     57        meridiemParse: /ص|م/,
     58        isPM: function (input) {
     59            return 'م' === input;
     60        },
     61        meridiem: function (hour, minute, isLower) {
     62            if (hour < 12) {
     63                return 'ص';
     64            } else {
     65                return 'م';
     66            }
     67        },
     68        calendar: {
     69            sameDay: '[اليوم على الساعة] LT',
     70            nextDay: '[غدا على الساعة] LT',
     71            nextWeek: 'dddd [على الساعة] LT',
     72            lastDay: '[أمس على الساعة] LT',
     73            lastWeek: 'dddd [على الساعة] LT',
     74            sameElse: 'L',
     75        },
     76        relativeTime: {
     77            future: 'في %s',
     78            past: 'منذ %s',
     79            s: 'ثوان',
     80            ss: '%d ثانية',
     81            m: 'دقيقة',
     82            mm: '%d دقائق',
     83            h: 'ساعة',
     84            hh: '%d ساعات',
     85            d: 'يوم',
     86            dd: '%d أيام',
     87            M: 'شهر',
     88            MM: '%d أشهر',
     89            y: 'سنة',
     90            yy: '%d سنوات',
     91        },
     92        preparse: function (string) {
     93            return string
     94                .replace(/[٣٤٥٦٧٨٩٠]/g, function (match) {
     95                    return numberMap[match];
     96                })
     97                .split('') // reversed since negative lookbehind not supported everywhere
     98                .reverse()
     99                .join('')
    100                .replace(/[١٢](?![\u062a\u0643])/g, function (match) {
    101                    return numberMap[match];
    102                })
    103                .split('')
    104                .reverse()
    105                .join('')
    106                .replace(/،/g, ',');
    107        },
    108        postformat: function (string) {
    109            return string
    110                .replace(/\d/g, function (match) {
    111                    return symbolMap[match];
    112                })
    113                .replace(/,/g, '،');
    114        },
    115        week: {
    116            dow: 0, // Sunday is the first day of the week.
    117            doy: 6, // The week that contains Jan 6th is the first week of the year.
    118        },
    119    });
    120
    121    return arPs;
    122
    123})));