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