2016-02-05 15:42:48 -05:00
|
|
|
|
//! moment.js locale configuration
|
2020-11-10 20:34:26 -05:00
|
|
|
|
//! locale : Arabic (Saudi Arabia) [ar-sa]
|
|
|
|
|
//! author : Suhail Alkowaileet : https://github.com/xsoh
|
2016-02-05 15:42:48 -05:00
|
|
|
|
|
|
|
|
|
;(function (global, factory) {
|
|
|
|
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
|
|
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
2017-04-20 00:24:20 -04:00
|
|
|
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
2016-02-05 15:42:48 -05:00
|
|
|
|
factory(global.moment)
|
2017-04-20 00:24:20 -04:00
|
|
|
|
}(this, (function (moment) { 'use strict';
|
2016-02-05 15:42:48 -05:00
|
|
|
|
|
2020-11-10 20:34:26 -05:00
|
|
|
|
//! moment.js locale configuration
|
2014-08-20 14:41:50 -04:00
|
|
|
|
|
2018-04-26 03:15:53 -04:00
|
|
|
|
var symbolMap = {
|
2020-11-10 20:34:26 -05:00
|
|
|
|
1: '١',
|
|
|
|
|
2: '٢',
|
|
|
|
|
3: '٣',
|
|
|
|
|
4: '٤',
|
|
|
|
|
5: '٥',
|
|
|
|
|
6: '٦',
|
|
|
|
|
7: '٧',
|
|
|
|
|
8: '٨',
|
|
|
|
|
9: '٩',
|
|
|
|
|
0: '٠',
|
|
|
|
|
},
|
|
|
|
|
numberMap = {
|
|
|
|
|
'١': '1',
|
|
|
|
|
'٢': '2',
|
|
|
|
|
'٣': '3',
|
|
|
|
|
'٤': '4',
|
|
|
|
|
'٥': '5',
|
|
|
|
|
'٦': '6',
|
|
|
|
|
'٧': '7',
|
|
|
|
|
'٨': '8',
|
|
|
|
|
'٩': '9',
|
|
|
|
|
'٠': '0',
|
|
|
|
|
};
|
2014-08-20 14:41:50 -04:00
|
|
|
|
|
2018-04-26 03:15:53 -04:00
|
|
|
|
var arSa = moment.defineLocale('ar-sa', {
|
2020-11-10 20:34:26 -05:00
|
|
|
|
months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
|
|
|
|
|
'_'
|
|
|
|
|
),
|
|
|
|
|
monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
|
|
|
|
|
'_'
|
|
|
|
|
),
|
|
|
|
|
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
|
|
|
|
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
|
|
|
|
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
|
|
|
|
weekdaysParseExact: true,
|
|
|
|
|
longDateFormat: {
|
|
|
|
|
LT: 'HH:mm',
|
|
|
|
|
LTS: 'HH:mm:ss',
|
|
|
|
|
L: 'DD/MM/YYYY',
|
|
|
|
|
LL: 'D MMMM YYYY',
|
|
|
|
|
LLL: 'D MMMM YYYY HH:mm',
|
|
|
|
|
LLLL: 'dddd D MMMM YYYY HH:mm',
|
2018-04-26 03:15:53 -04:00
|
|
|
|
},
|
|
|
|
|
meridiemParse: /ص|م/,
|
2020-11-10 20:34:26 -05:00
|
|
|
|
isPM: function (input) {
|
2018-04-26 03:15:53 -04:00
|
|
|
|
return 'م' === input;
|
|
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
|
meridiem: function (hour, minute, isLower) {
|
2018-04-26 03:15:53 -04:00
|
|
|
|
if (hour < 12) {
|
|
|
|
|
return 'ص';
|
|
|
|
|
} else {
|
|
|
|
|
return 'م';
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
|
calendar: {
|
2018-04-26 03:15:53 -04:00
|
|
|
|
sameDay: '[اليوم على الساعة] LT',
|
|
|
|
|
nextDay: '[غدا على الساعة] LT',
|
|
|
|
|
nextWeek: 'dddd [على الساعة] LT',
|
|
|
|
|
lastDay: '[أمس على الساعة] LT',
|
|
|
|
|
lastWeek: 'dddd [على الساعة] LT',
|
2020-11-10 20:34:26 -05:00
|
|
|
|
sameElse: 'L',
|
2018-04-26 03:15:53 -04:00
|
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
|
relativeTime: {
|
|
|
|
|
future: 'في %s',
|
|
|
|
|
past: 'منذ %s',
|
|
|
|
|
s: 'ثوان',
|
|
|
|
|
ss: '%d ثانية',
|
|
|
|
|
m: 'دقيقة',
|
|
|
|
|
mm: '%d دقائق',
|
|
|
|
|
h: 'ساعة',
|
|
|
|
|
hh: '%d ساعات',
|
|
|
|
|
d: 'يوم',
|
|
|
|
|
dd: '%d أيام',
|
|
|
|
|
M: 'شهر',
|
|
|
|
|
MM: '%d أشهر',
|
|
|
|
|
y: 'سنة',
|
|
|
|
|
yy: '%d سنوات',
|
2018-04-26 03:15:53 -04:00
|
|
|
|
},
|
|
|
|
|
preparse: function (string) {
|
2020-11-10 20:34:26 -05:00
|
|
|
|
return string
|
|
|
|
|
.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
|
|
|
|
|
return numberMap[match];
|
|
|
|
|
})
|
|
|
|
|
.replace(/،/g, ',');
|
2018-04-26 03:15:53 -04:00
|
|
|
|
},
|
|
|
|
|
postformat: function (string) {
|
2020-11-10 20:34:26 -05:00
|
|
|
|
return string
|
|
|
|
|
.replace(/\d/g, function (match) {
|
|
|
|
|
return symbolMap[match];
|
|
|
|
|
})
|
|
|
|
|
.replace(/,/g, '،');
|
|
|
|
|
},
|
|
|
|
|
week: {
|
|
|
|
|
dow: 0, // Sunday is the first day of the week.
|
|
|
|
|
doy: 6, // The week that contains Jan 6th is the first week of the year.
|
2018-04-26 03:15:53 -04:00
|
|
|
|
},
|
|
|
|
|
});
|
2016-02-05 15:42:48 -05:00
|
|
|
|
|
2018-04-26 03:15:53 -04:00
|
|
|
|
return arSa;
|
2016-02-05 15:42:48 -05:00
|
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
|
})));
|