cscg24-guacamole

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

ar-sa.js (3782B)


      1//! moment.js locale configuration
      2//! locale : Arabic (Saudi Arabia) [ar-sa]
      3//! author : Suhail Alkowaileet : https://github.com/xsoh
      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 arSa = moment.defineLocale('ar-sa', {
     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        preparse: function (string) {
     95            return string
     96                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
     97                    return numberMap[match];
     98                })
     99                .replace(/،/g, ',');
    100        },
    101        postformat: function (string) {
    102            return string
    103                .replace(/\d/g, function (match) {
    104                    return symbolMap[match];
    105                })
    106                .replace(/,/g, '،');
    107        },
    108        week: {
    109            dow: 0, // Sunday is the first day of the week.
    110            doy: 6, // The week that contains Jan 6th is the first week of the year.
    111        },
    112    });
    113
    114    return arSa;
    115
    116})));