aboutsummaryrefslogtreecommitdiffstats
path: root/resources/lib/moment/locale/ar-sa.js
diff options
context:
space:
mode:
authorpaladox <thomasmulhall410@yahoo.com>2014-09-06 12:54:30 +0000
committerTimo Tijhof <krinklemail@gmail.com>2014-09-08 01:20:31 +0200
commit43f46b6c92aaaee0678d6516e799aa8717efda42 (patch)
tree12d89f45da18e81776916347f4ade4ba448f17b1 /resources/lib/moment/locale/ar-sa.js
parentd1b6cd35d4aa117c454994b4a7896fee8abf17d2 (diff)
downloadmediawikicore-43f46b6c92aaaee0678d6516e799aa8717efda42.tar.gz
mediawikicore-43f46b6c92aaaee0678d6516e799aa8717efda42.zip
Update Moment.js from 2.8.1 to 2.8.3
Project site * http://momentjs.com * https://github.com/moment/moment/ File source * https://github.com/moment/moment/tree/2.8.3 Changelog * https://github.com/moment/moment/blob/2.8.3/CHANGELOG.md Difference between 2.8.1 and 2.8.3 1.8.3 Bugfixes: * #1801 proper pluralization for Arabic * #1833 improve spm integration * #1871 fix zone bug caused by Firefox 24 * #1882 Use hh:mm in Czech * #1883 Fix 2.8.0 regression in duration as conversions * #1890 Faster travis builds * #1892 Faster isBefore/After/Same * #1848 Fix flaky month diffs * #1895 Fix 2.8.0 regression in moment.utc with format array * #1896 Support setting invalid instance locale (noop) * #1897 Support moment([str]) in addition to moment([int]) 1.8.2 Minor bugfixes: * #1874 use Object.prototype.hasOwnProperty instead of obj.hasOwnProperty (ie8 bug) * #1873 add duration#toString() * #1859 better month/weekday names in norwegian * #1812 meridiem parsing for greek * #1804 spanish del -> de * #1800 korean LT improvement Change-Id: I60595e8ea41e136c7afee12ad3702ecec6dd4aef
Diffstat (limited to 'resources/lib/moment/locale/ar-sa.js')
-rw-r--r--resources/lib/moment/locale/ar-sa.js96
1 files changed, 96 insertions, 0 deletions
diff --git a/resources/lib/moment/locale/ar-sa.js b/resources/lib/moment/locale/ar-sa.js
new file mode 100644
index 000000000000..f7867eacf91d
--- /dev/null
+++ b/resources/lib/moment/locale/ar-sa.js
@@ -0,0 +1,96 @@
+// moment.js locale configuration
+// locale : Arabic Saudi Arabia (ar-sa)
+// author : Suhail Alkowaileet : https://github.com/xsoh
+
+(function (factory) {
+ if (typeof define === 'function' && define.amd) {
+ define(['moment'], factory); // AMD
+ } else if (typeof exports === 'object') {
+ module.exports = factory(require('../moment')); // Node
+ } else {
+ factory(window.moment); // Browser global
+ }
+}(function (moment) {
+ var symbolMap = {
+ '1': '١',
+ '2': '٢',
+ '3': '٣',
+ '4': '٤',
+ '5': '٥',
+ '6': '٦',
+ '7': '٧',
+ '8': '٨',
+ '9': '٩',
+ '0': '٠'
+ }, numberMap = {
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ '٠': '0'
+ };
+
+ return moment.defineLocale('ar-sa', {
+ months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
+ monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
+ weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ longDateFormat : {
+ LT : 'HH:mm',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY LT',
+ LLLL : 'dddd D MMMM YYYY LT'
+ },
+ meridiem : function (hour, minute, isLower) {
+ if (hour < 12) {
+ return 'ص';
+ } else {
+ return 'م';
+ }
+ },
+ calendar : {
+ sameDay: '[اليوم على الساعة] LT',
+ nextDay: '[غدا على الساعة] LT',
+ nextWeek: 'dddd [على الساعة] LT',
+ lastDay: '[أمس على الساعة] LT',
+ lastWeek: 'dddd [على الساعة] LT',
+ sameElse: 'L'
+ },
+ relativeTime : {
+ future : 'في %s',
+ past : 'منذ %s',
+ s : 'ثوان',
+ m : 'دقيقة',
+ mm : '%d دقائق',
+ h : 'ساعة',
+ hh : '%d ساعات',
+ d : 'يوم',
+ dd : '%d أيام',
+ M : 'شهر',
+ MM : '%d أشهر',
+ y : 'سنة',
+ yy : '%d سنوات'
+ },
+ preparse: function (string) {
+ return string.replace(/[۰-۹]/g, function (match) {
+ return numberMap[match];
+ }).replace(/،/g, ',');
+ },
+ postformat: function (string) {
+ return string.replace(/\d/g, function (match) {
+ return symbolMap[match];
+ }).replace(/,/g, '،');
+ },
+ week : {
+ dow : 6, // Saturday is the first day of the week.
+ doy : 12 // The week that contains Jan 1st is the first week of the year.
+ }
+ });
+}));