PageSourceSearch

https://marcoballetta.com/wp-content/plugins/add-twitter-feed/js/b…/moment/locale/ar.js?ver=7.1.2

js marcoballetta.com collected 2026-10-06 13:14:59 UTC 5,010 bytes, 130 lines download raw bytes

1// moment.js locale configuration
2// Locale: Arabic (ar)
3// Author: Abdel Said: https://github.com/abdelsaid
4// Changes in months, weekdays: Ahmed Elkhatib
5// Native plural forms: forabi https://github.com/forabi
6
7(function (factory) {
8    if (typeof define === 'function' && define.amd) {
9        define(['moment'], factory); // AMD
10    } else if (typeof exports === 'object') {
11        module.exports = factory(require('../moment')); // Node
12    } else {
13        factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
14    }
15}(function (moment) {
16    var symbolMap = {
17        '1': 'Ù¡',
18        '2': 'Ù¢',
19        '3': 'Ù£',
20        '4': 'Ù¤',
21        '5': 'Ù¥',
22        '6': 'Ù¦',
23        '7': 'Ù§',
24        '8': 'Ù¨',
25        '9': 'Ù©',
26        '0': 'Ù '
27    }, numberMap = {
28        'Ù¡': '1',
29        'Ù¢': '2',
30        'Ù£': '3',
31        'Ù¤': '4',
32        'Ù¥': '5',
33        'Ù¦': '6',
34        'Ù§': '7',
35        'Ù¨': '8',
36        'Ù©': '9',
37        'Ù ': '0'
38    }, pluralForm = function (n) {
39        return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
40    }, plurals = {
41        s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
42        m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
43        h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
44        d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
45        M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
46        y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
47    }, pluralize = function (u) {
48        return function (number, withoutSuffix, string, isFuture) {
49            var f = pluralForm(number),
50                str = plurals[u][pluralForm(number)];
51            if (f === 2) {
52                str = str[withoutSuffix ? 0 : 1];
53            }
54            return str.replace(/%d/i, number);
55        };
56    }, months = [
57        'كانون الثاني يناير',
58        'شباط فبراير',
59        'آذار مارس',
60        'نيسان أبريل',
61        'أيار مايو',
62        'حزيران يونيو',
63        'تموز يوليو',
64        'آب أغسطس',
65        'أيلول سبتمبر',
66        'تشرين الأول أكتوبر',
67        'تشرين الثاني نوفمبر',
68        'كانون الأول ديسمبر'
69    ];
70
71    return moment.defineLocale('ar', {
72        months : months,
73        monthsShort : months,
74        weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
75        weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
76        weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
77        longDateFormat : {
78            LT : 'HH:mm',
79            LTS : 'HH:mm:ss',
80            L : 'DD/MM/YYYY',
81            LL : 'D MMMM YYYY',
82            LLL : 'D MMMM YYYY LT',
83            LLLL : 'dddd D MMMM YYYY LT'
84        },
85        meridiem : function (hour, minute, isLower) {
86            if (hour < 12) {
87                return 'ص';
88            } else {
89                return 'م';
90            }
91        },
92        calendar : {
93            sameDay: '[اليوم عند الساعة] LT',
94            nextDay: '[غدًا عند الساعة] LT',
95            nextWeek: 'dddd [عند الساعة] LT',
96            lastDay: '[أمس عند الساعة] LT',
97            lastWeek: 'dddd [عند الساعة] LT',
98            sameElse: 'L'
99        },
100        relativeTime : {
101            future : 'بعد %s',
102            past : 'منذ %s',
103            s : pluralize('s'),
104            m : pluralize('m'),
105            mm : pluralize('m'),
106            h : pluralize('h'),
107            hh : pluralize('h'),
108            d : pluralize('d'),
109            dd : pluralize('d'),
110            M : pluralize('M'),
111            MM : pluralize('M'),
112            y : pluralize('y'),
113            yy : pluralize('y')
114        },
115        preparse: function (string) {
116            return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
117                return numberMap[match];
118            }).replace(/،/g, ',');
119        },
120        postformat: function (string) {
121            return string.replace(/\d/g, function (match) {
122                return symbolMap[match];
123            }).replace(/,/g, '،');
124        },
125        week : {
126            dow : 6, // Saturday is the first day of the week.
127            doy : 12  // The week that contains Jan 1st is the first week of the year.
128        }
129    });
130}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.