corrade-nucleus-nucleons – Blame information for rev 38
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
38 | office | 1 | //! moment.js locale configuration |
2 | //! locale : Arabic (Saudi Arabia) [ar-sa] |
||
3 | //! author : Suhail Alkowaileet : https://github.com/xsoh |
||
4 | |||
5 | ;(function (global, factory) { |
||
6 | typeof exports === 'object' && typeof module !== 'undefined' |
||
7 | && typeof require === 'function' ? factory(require('../moment')) : |
||
8 | typeof define === 'function' && define.amd ? define(['../moment'], factory) : |
||
9 | factory(global.moment) |
||
10 | }(this, (function (moment) { 'use strict'; |
||
11 | |||
12 | |||
13 | var symbolMap = { |
||
14 | '1': '١', |
||
15 | '2': '٢', |
||
16 | '3': '٣', |
||
17 | '4': '٤', |
||
18 | '5': '٥', |
||
19 | '6': '٦', |
||
20 | '7': '٧', |
||
21 | '8': '٨', |
||
22 | '9': '٩', |
||
23 | '0': '٠' |
||
24 | }; |
||
25 | var numberMap = { |
||
26 | '١': '1', |
||
27 | '٢': '2', |
||
28 | '٣': '3', |
||
29 | '٤': '4', |
||
30 | '٥': '5', |
||
31 | '٦': '6', |
||
32 | '٧': '7', |
||
33 | '٨': '8', |
||
34 | '٩': '9', |
||
35 | '٠': '0' |
||
36 | }; |
||
37 | |||
38 | var arSa = moment.defineLocale('ar-sa', { |
||
39 | months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), |
||
40 | monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), |
||
41 | weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), |
||
42 | weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), |
||
43 | weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), |
||
44 | weekdaysParseExact : true, |
||
45 | longDateFormat : { |
||
46 | LT : 'HH:mm', |
||
47 | LTS : 'HH:mm:ss', |
||
48 | L : 'DD/MM/YYYY', |
||
49 | LL : 'D MMMM YYYY', |
||
50 | LLL : 'D MMMM YYYY HH:mm', |
||
51 | LLLL : 'dddd D MMMM YYYY HH:mm' |
||
52 | }, |
||
53 | meridiemParse: /ص|م/, |
||
54 | isPM : function (input) { |
||
55 | return 'م' === input; |
||
56 | }, |
||
57 | meridiem : function (hour, minute, isLower) { |
||
58 | if (hour < 12) { |
||
59 | return 'ص'; |
||
60 | } else { |
||
61 | return 'م'; |
||
62 | } |
||
63 | }, |
||
64 | calendar : { |
||
65 | sameDay: '[اليوم على الساعة] LT', |
||
66 | nextDay: '[غدا على الساعة] LT', |
||
67 | nextWeek: 'dddd [على الساعة] LT', |
||
68 | lastDay: '[أمس على الساعة] LT', |
||
69 | lastWeek: 'dddd [على الساعة] LT', |
||
70 | sameElse: 'L' |
||
71 | }, |
||
72 | relativeTime : { |
||
73 | future : 'في %s', |
||
74 | past : 'منذ %s', |
||
75 | s : 'ثوان', |
||
76 | m : 'دقيقة', |
||
77 | mm : '%d دقائق', |
||
78 | h : 'ساعة', |
||
79 | hh : '%d ساعات', |
||
80 | d : 'يوم', |
||
81 | dd : '%d أيام', |
||
82 | M : 'شهر', |
||
83 | MM : '%d أشهر', |
||
84 | y : 'سنة', |
||
85 | yy : '%d سنوات' |
||
86 | }, |
||
87 | preparse: function (string) { |
||
88 | return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { |
||
89 | return numberMap[match]; |
||
90 | }).replace(/،/g, ','); |
||
91 | }, |
||
92 | postformat: function (string) { |
||
93 | return string.replace(/\d/g, function (match) { |
||
94 | return symbolMap[match]; |
||
95 | }).replace(/,/g, '،'); |
||
96 | }, |
||
97 | week : { |
||
98 | dow : 0, // Sunday is the first day of the week. |
||
99 | doy : 6 // The week that contains Jan 1st is the first week of the year. |
||
100 | } |
||
101 | }); |
||
102 | |||
103 | return arSa; |
||
104 | |||
105 | }))); |