1 //! moment.js locale configuration
2 //! locale : Arabic [ar]
3 //! author : Abdel Said: https://github.com/abdelsaid
4 //! author : Ahmed Elkhatib
5 //! author : forabi https://github.com/forabi
7 ;(function (global, factory) {
8 typeof exports === 'object' && typeof module !== 'undefined'
9 && typeof require === 'function' ? factory(require('../moment')) :
10 typeof define === 'function' && define.amd ? define(['../moment'], factory) :
11 factory(global.moment)
12 }(this, (function (moment) { 'use strict';
14 //! moment.js locale configuration
40 pluralForm = function (n) {
47 : n % 100 >= 3 && n % 100 <= 10
57 ['ثانيتان', 'ثانيتين'],
65 ['دقيقتان', 'دقيقتين'],
103 pluralize = function (u) {
104 return function (number, withoutSuffix, string, isFuture) {
105 var f = pluralForm(number),
106 str = plurals[u][pluralForm(number)];
108 str = str[withoutSuffix ? 0 : 1];
110 return str.replace(/%d/i, number);
128 var ar = moment.defineLocale('ar', {
131 weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
132 weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
133 weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
134 weekdaysParseExact: true,
138 L: 'D/\u200FM/\u200FYYYY',
140 LLL: 'D MMMM YYYY HH:mm',
141 LLLL: 'dddd D MMMM YYYY HH:mm',
143 meridiemParse: /ص|م/,
144 isPM: function (input) {
145 return 'م' === input;
147 meridiem: function (hour, minute, isLower) {
155 sameDay: '[اليوم عند الساعة] LT',
156 nextDay: '[غدًا عند الساعة] LT',
157 nextWeek: 'dddd [عند الساعة] LT',
158 lastDay: '[أمس عند الساعة] LT',
159 lastWeek: 'dddd [عند الساعة] LT',
178 preparse: function (string) {
180 .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
181 return numberMap[match];
185 postformat: function (string) {
187 .replace(/\d/g, function (match) {
188 return symbolMap[match];
193 dow: 6, // Saturday is the first day of the week.
194 doy: 12, // The week that contains Jan 12th is the first week of the year.