Revert "Export"
[framework/web/web-ui-fw.git] / libs / js / globalize / lib / cultures / globalize.culture.ar-OM.js
1 /*
2  * Globalize Culture ar-OM
3  *
4  * http://github.com/jquery/globalize
5  *
6  * Copyright Software Freedom Conservancy, Inc.
7  * Dual licensed under the MIT or GPL Version 2 licenses.
8  * http://jquery.org/license
9  *
10  * This file was generated by the Globalize Culture Generator
11  * Translation: bugs found in this file need to be fixed in the generator
12  */
13
14 (function( window, undefined ) {
15
16 var Globalize;
17
18 if ( typeof require !== "undefined"
19         && typeof exports !== "undefined"
20         && typeof module !== "undefined" ) {
21         // Assume CommonJS
22         Globalize = require( "globalize" );
23 } else {
24         // Global variable
25         Globalize = window.Globalize;
26 }
27
28 Globalize.addCultureInfo( "ar-OM", "default", {
29         name: "ar-OM",
30         englishName: "Arabic (Oman)",
31         nativeName: "العربية (عمان)",
32         language: "ar",
33         isRTL: true,
34         numberFormat: {
35                 pattern: ["n-"],
36                 NaN: "ليس برقم",
37                 negativeInfinity: "-لا نهاية",
38                 positiveInfinity: "+لا نهاية",
39                 currency: {
40                         pattern: ["$n-","$ n"],
41                         decimals: 3,
42                         symbol: "ر.ع.‏"
43                 }
44         },
45         calendars: {
46                 standard: {
47                         firstDay: 6,
48                         days: {
49                                 names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
50                                 namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
51                                 namesShort: ["ح","ن","ث","ر","خ","ج","س"]
52                         },
53                         months: {
54                                 names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
55                                 namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
56                         },
57                         AM: ["ص","ص","ص"],
58                         PM: ["م","م","م"],
59                         patterns: {
60                                 d: "dd/MM/yyyy",
61                                 D: "dd MMMM, yyyy",
62                                 t: "hh:mm tt",
63                                 T: "hh:mm:ss tt",
64                                 f: "dd MMMM, yyyy hh:mm tt",
65                                 F: "dd MMMM, yyyy hh:mm:ss tt",
66                                 M: "dd MMMM"
67                         }
68                 },
69                 Hijri: {
70                         name: "Hijri",
71                         firstDay: 6,
72                         days: {
73                                 names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
74                                 namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
75                                 namesShort: ["ح","ن","ث","ر","خ","ج","س"]
76                         },
77                         months: {
78                                 names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
79                                 namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
80                         },
81                         AM: ["ص","ص","ص"],
82                         PM: ["م","م","م"],
83                         eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
84                         twoDigitYearMax: 1451,
85                         patterns: {
86                                 d: "dd/MM/yy",
87                                 D: "dd/MM/yyyy",
88                                 t: "hh:mm tt",
89                                 T: "hh:mm:ss tt",
90                                 f: "dd/MM/yyyy hh:mm tt",
91                                 F: "dd/MM/yyyy hh:mm:ss tt",
92                                 M: "dd MMMM"
93                         },
94                         convert: {
95                     // Adapted to Script from System.Globalization.HijriCalendar
96                     ticks1970: 62135596800000,
97                     // number of days leading up to each month
98                     monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
99                     minDate: -42521673600000,
100                     maxDate: 253402300799999,
101                     // The number of days to add or subtract from the calendar to accommodate the variances
102                     // in the start and the end of Ramadan and to accommodate the date difference between
103                     // countries/regions. May be dynamically adjusted based on user preference, but should
104                     // remain in the range of -2 to 2, inclusive.
105                     hijriAdjustment: 0,
106                     toGregorian: function(hyear, hmonth, hday) {
107                         var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
108                         // 86400000 = ticks per day
109                         var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
110                         // adjust for timezone, because we are interested in the gregorian date for the same timezone
111                         // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
112                         // date in the current timezone.
113                         gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
114                         return gdate;
115                     },
116                     fromGregorian: function(gdate) {
117                         if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
118                         var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
119                             daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
120                         // very particular formula determined by someone smart, adapted from the server-side implementation.
121                         // it approximates the hijri year.
122                         var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
123                             absDays = this.daysToYear(hyear),
124                             daysInYear = this.isLeapYear(hyear) ? 355 : 354;
125                         // hyear is just approximate, it may need adjustment up or down by 1.
126                         if (daysSinceJan0101 < absDays) {
127                             hyear--;
128                             absDays -= daysInYear;
129                         }
130                         else if (daysSinceJan0101 === absDays) {
131                             hyear--;
132                             absDays = this.daysToYear(hyear);
133                         }
134                         else {
135                             if (daysSinceJan0101 > (absDays + daysInYear)) {
136                                 absDays += daysInYear;
137                                 hyear++;
138                             }
139                         }
140                         // determine month by looking at how many days into the hyear we are
141                         // monthDays contains the number of days up to each month.
142                         hmonth = 0;
143                         var daysIntoYear = daysSinceJan0101 - absDays;
144                         while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
145                             hmonth++;
146                         }
147                         hmonth--;
148                         hday = daysIntoYear - this.monthDays[hmonth];
149                         return [hyear, hmonth, hday];
150                     },
151                     daysToYear: function(year) {
152                         // calculates how many days since Jan 1, 0001
153                         var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
154                             yearsInto30 = year - yearsToYear30 - 1,
155                             days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
156                         while (yearsInto30 > 0) {
157                             days += (this.isLeapYear(yearsInto30) ? 355 : 354);
158                             yearsInto30--;
159                         }
160                         return days;
161                     },
162                     isLeapYear: function(year) {
163                         return ((((year * 11) + 14) % 30) < 11);
164                     }
165                         }
166                 },
167                 UmAlQura: {
168                         name: "UmAlQura",
169                         firstDay: 6,
170                         days: {
171                                 names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
172                                 namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
173                                 namesShort: ["ح","ن","ث","ر","خ","ج","س"]
174                         },
175                         months: {
176                                 names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
177                                 namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
178                         },
179                         AM: ["ص","ص","ص"],
180                         PM: ["م","م","م"],
181                         eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
182                         twoDigitYearMax: 1451,
183                         patterns: {
184                                 d: "dd/MM/yy",
185                                 D: "dd/MMMM/yyyy",
186                                 t: "hh:mm tt",
187                                 T: "hh:mm:ss tt",
188                                 f: "dd/MMMM/yyyy hh:mm tt",
189                                 F: "dd/MMMM/yyyy hh:mm:ss tt",
190                                 M: "dd MMMM"
191                         },
192                         convert: {
193                     _yearInfo: [
194                         // MonthLengthFlags, Gregorian Date
195                         [746, -2198707200000],
196                         [1769, -2168121600000],
197                         [3794, -2137449600000],
198                         [3748, -2106777600000],
199                         [3402, -2076192000000],
200                         [2710, -2045606400000],
201                         [1334, -2015020800000],
202                         [2741, -1984435200000],
203                         [3498, -1953763200000],
204                         [2980, -1923091200000],
205                         [2889, -1892505600000],
206                         [2707, -1861920000000],
207                         [1323, -1831334400000],
208                         [2647, -1800748800000],
209                         [1206, -1770076800000],
210                         [2741, -1739491200000],
211                         [1450, -1708819200000],
212                         [3413, -1678233600000],
213                         [3370, -1647561600000],
214                         [2646, -1616976000000],
215                         [1198, -1586390400000],
216                         [2397, -1555804800000],
217                         [748, -1525132800000],
218                         [1749, -1494547200000],
219                         [1706, -1463875200000],
220                         [1365, -1433289600000],
221                         [1195, -1402704000000],
222                         [2395, -1372118400000],
223                         [698, -1341446400000],
224                         [1397, -1310860800000],
225                         [2994, -1280188800000],
226                         [1892, -1249516800000],
227                         [1865, -1218931200000],
228                         [1621, -1188345600000],
229                         [683, -1157760000000],
230                         [1371, -1127174400000],
231                         [2778, -1096502400000],
232                         [1748, -1065830400000],
233                         [3785, -1035244800000],
234                         [3474, -1004572800000],
235                         [3365, -973987200000],
236                         [2637, -943401600000],
237                         [685, -912816000000],
238                         [1389, -882230400000],
239                         [2922, -851558400000],
240                         [2898, -820886400000],
241                         [2725, -790300800000],
242                         [2635, -759715200000],
243                         [1175, -729129600000],
244                         [2359, -698544000000],
245                         [694, -667872000000],
246                         [1397, -637286400000],
247                         [3434, -606614400000],
248                         [3410, -575942400000],
249                         [2710, -545356800000],
250                         [2349, -514771200000],
251                         [605, -484185600000],
252                         [1245, -453600000000],
253                         [2778, -422928000000],
254                         [1492, -392256000000],
255                         [3497, -361670400000],
256                         [3410, -330998400000],
257                         [2730, -300412800000],
258                         [1238, -269827200000],
259                         [2486, -239241600000],
260                         [884, -208569600000],
261                         [1897, -177984000000],
262                         [1874, -147312000000],
263                         [1701, -116726400000],
264                         [1355, -86140800000],
265                         [2731, -55555200000],
266                         [1370, -24883200000],
267                         [2773, 5702400000],
268                         [3538, 36374400000],
269                         [3492, 67046400000],
270                         [3401, 97632000000],
271                         [2709, 128217600000],
272                         [1325, 158803200000],
273                         [2653, 189388800000],
274                         [1370, 220060800000],
275                         [2773, 250646400000],
276                         [1706, 281318400000],
277                         [1685, 311904000000],
278                         [1323, 342489600000],
279                         [2647, 373075200000],
280                         [1198, 403747200000],
281                         [2422, 434332800000],
282                         [1388, 465004800000],
283                         [2901, 495590400000],
284                         [2730, 526262400000],
285                         [2645, 556848000000],
286                         [1197, 587433600000],
287                         [2397, 618019200000],
288                         [730, 648691200000],
289                         [1497, 679276800000],
290                         [3506, 709948800000],
291                         [2980, 740620800000],
292                         [2890, 771206400000],
293                         [2645, 801792000000],
294                         [693, 832377600000],
295                         [1397, 862963200000],
296                         [2922, 893635200000],
297                         [3026, 924307200000],
298                         [3012, 954979200000],
299                         [2953, 985564800000],
300                         [2709, 1016150400000],
301                         [1325, 1046736000000],
302                         [1453, 1077321600000],
303                         [2922, 1107993600000],
304                         [1748, 1138665600000],
305                         [3529, 1169251200000],
306                         [3474, 1199923200000],
307                         [2726, 1230508800000],
308                         [2390, 1261094400000],
309                         [686, 1291680000000],
310                         [1389, 1322265600000],
311                         [874, 1352937600000],
312                         [2901, 1383523200000],
313                         [2730, 1414195200000],
314                         [2381, 1444780800000],
315                         [1181, 1475366400000],
316                         [2397, 1505952000000],
317                         [698, 1536624000000],
318                         [1461, 1567209600000],
319                         [1450, 1597881600000],
320                         [3413, 1628467200000],
321                         [2714, 1659139200000],
322                         [2350, 1689724800000],
323                         [622, 1720310400000],
324                         [1373, 1750896000000],
325                         [2778, 1781568000000],
326                         [1748, 1812240000000],
327                         [1701, 1842825600000],
328                         [0, 1873411200000]
329                     ],
330                     minDate: -2198707200000,
331                     maxDate: 1873411199999,
332                     toGregorian: function(hyear, hmonth, hday) {
333                         var days = hday - 1,
334                             gyear = hyear - 1318;
335                         if (gyear < 0 || gyear >= this._yearInfo.length) return null;
336                         var info = this._yearInfo[gyear],
337                             gdate = new Date(info[1]),
338                             monthLength = info[0];
339                         // Date's ticks in javascript are always from the GMT time,
340                         // but we are interested in the gregorian date in the same timezone,
341                         // not what the gregorian date was at GMT time, so we adjust for the offset.
342                         gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
343                         for (var i = 0; i < hmonth; i++) {
344                             days += 29 + (monthLength & 1);
345                             monthLength = monthLength >> 1;
346                         }
347                         gdate.setDate(gdate.getDate() + days);
348                         return gdate;
349                     },
350                     fromGregorian: function(gdate) {
351                         // Date's ticks in javascript are always from the GMT time,
352                         // but we are interested in the hijri date in the same timezone,
353                         // not what the hijri date was at GMT time, so we adjust for the offset.
354                         var ticks = gdate - gdate.getTimezoneOffset() * 60000;
355                         if (ticks < this.minDate || ticks > this.maxDate) return null;
356                         var hyear = 0,
357                             hmonth = 1;
358                         // find the earliest gregorian date in the array that is greater than or equal to the given date
359                         while (ticks > this._yearInfo[++hyear][1]) { }
360                         if (ticks !== this._yearInfo[hyear][1]) {
361                             hyear--;
362                         }
363                         var info = this._yearInfo[hyear],
364                             // how many days has it been since the date we found in the array?
365                             // 86400000 = ticks per day
366                             days = Math.floor((ticks - info[1]) / 86400000),
367                             monthLength = info[0];
368                         hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
369                         // now increment day/month based on the total days, considering
370                         // how many days are in each month. We cannot run past the year
371                         // mark since we would have found a different array entry in that case.
372                         var daysInMonth = 29 + (monthLength & 1);
373                         while (days >= daysInMonth) {
374                             days -= daysInMonth;
375                             monthLength = monthLength >> 1;
376                             daysInMonth = 29 + (monthLength & 1);
377                             hmonth++;
378                         }
379                         // remaining days is less than is in one month, thus is the day of the month we landed on
380                         // hmonth-1 because in javascript months are zero based, stay consistent with that.
381                         return [hyear, hmonth - 1, days + 1];
382                     }
383                         }
384                 },
385                 Gregorian_MiddleEastFrench: {
386                         name: "Gregorian_MiddleEastFrench",
387                         firstDay: 6,
388                         days: {
389                                 names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
390                                 namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
391                                 namesShort: ["di","lu","ma","me","je","ve","sa"]
392                         },
393                         months: {
394                                 names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
395                                 namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
396                         },
397                         AM: ["ص","ص","ص"],
398                         PM: ["م","م","م"],
399                         eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
400                         patterns: {
401                                 d: "MM/dd/yyyy",
402                                 t: "hh:mm tt",
403                                 T: "hh:mm:ss tt",
404                                 f: "dddd, MMMM dd, yyyy hh:mm tt",
405                                 F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
406                                 M: "dd MMMM"
407                         }
408                 },
409                 Gregorian_Arabic: {
410                         name: "Gregorian_Arabic",
411                         firstDay: 6,
412                         days: {
413                                 names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
414                                 namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
415                                 namesShort: ["ح","ن","ث","ر","خ","ج","س"]
416                         },
417                         months: {
418                                 names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
419                                 namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
420                         },
421                         AM: ["ص","ص","ص"],
422                         PM: ["م","م","م"],
423                         eras: [{"name":"م","start":null,"offset":0}],
424                         patterns: {
425                                 d: "MM/dd/yyyy",
426                                 t: "hh:mm tt",
427                                 T: "hh:mm:ss tt",
428                                 f: "dddd, MMMM dd, yyyy hh:mm tt",
429                                 F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
430                         }
431                 },
432                 Gregorian_TransliteratedFrench: {
433                         name: "Gregorian_TransliteratedFrench",
434                         firstDay: 6,
435                         days: {
436                                 names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
437                                 namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
438                                 namesShort: ["ح","ن","ث","ر","خ","ج","س"]
439                         },
440                         months: {
441                                 names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
442                                 namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
443                         },
444                         AM: ["ص","ص","ص"],
445                         PM: ["م","م","م"],
446                         eras: [{"name":"م","start":null,"offset":0}],
447                         patterns: {
448                                 d: "MM/dd/yyyy",
449                                 t: "hh:mm tt",
450                                 T: "hh:mm:ss tt",
451                                 f: "dddd, MMMM dd, yyyy hh:mm tt",
452                                 F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
453                         }
454                 }
455         }
456 });
457
458 }( this ));