1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-09-20 14:01:55 +00:00
musix-oss/node_modules/date-and-time/locale/ar.js
2019-10-10 16:43:04 +03:00

48 lines
2.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @preserve date-and-time.js locale configuration
* @preserve Arabic (ar)
* @preserve It is using moment.js locale configuration as a reference.
*/
(function (global) {
'use strict';
var exec = function (date) {
date.locale('ar', {
res: {
MMMM: ['كانون الثاني يناير', 'شباط فبراير', 'آذار مارس', 'نيسان أبريل', 'أيار مايو', 'حزيران يونيو', 'تموز يوليو', 'آب أغسطس', 'أيلول سبتمبر', 'تشرين الأول أكتوبر', 'تشرين الثاني نوفمبر', 'كانون الأول ديسمبر'],
MMM: ['كانون الثاني يناير', 'شباط فبراير', 'آذار مارس', 'نيسان أبريل', 'أيار مايو', 'حزيران يونيو', 'تموز يوليو', 'آب أغسطس', 'أيلول سبتمبر', 'تشرين الأول أكتوبر', 'تشرين الثاني نوفمبر', 'كانون الأول ديسمبر'],
dddd: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
ddd: ['أحد', 'إثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
dd: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
A: ['ص', 'م']
},
formatter: {
post: function (str) {
var num = ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'];
return str.replace(/\d/g, function (i) {
return num[i | 0];
});
}
},
parser: {
pre: function (str) {
var map = { '٠': 0, '١': 1, '٢': 2, '٣': 3, '٤': 4, '٥': 5, '٦': 6, '٧': 7, '٨': 8, '٩': 9 };
return str.replace(/[٠١٢٣٤٥٦٧٨٩]/g, function (i) {
return '' + map[i];
});
}
}
});
};
if (typeof module === 'object' && typeof module.exports === 'object') {
(module.paths || []).push('./');
exec(require('date-and-time'));
} else if (typeof define === 'function' && define.amd) {
define(['date-and-time'], exec);
} else {
exec(global.date);
}
}(this));