2 * Globalize Culture ar-TN
4 * http://github.com/jquery/globalize
6 * Copyright Software Freedom Conservancy, Inc.
7 * Dual licensed under the MIT or GPL Version 2 licenses.
8 * http://jquery.org/license
10 * This file was generated by the Globalize Culture Generator
11 * Translation: bugs found in this file need to be fixed in the generator
14 (function( window, undefined ) {
18 if ( typeof require !== "undefined"
19 && typeof exports !== "undefined"
20 && typeof module !== "undefined" ) {
22 Globalize = require( "globalize" );
25 Globalize = window.Globalize;
28 Globalize.addCultureInfo( "ar-TN", "default", {
30 englishName: "Arabic (Tunisia)",
31 nativeName: "العربية (تونس)",
38 negativeInfinity: "-لا نهاية",
39 positiveInfinity: "+لا نهاية",
44 pattern: ["$n-","$ n"],
54 names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
55 namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
56 namesShort: ["ح","ن","ث","ر","خ","ج","س"]
59 names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
60 namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
69 f: "dd MMMM, yyyy H:mm",
70 F: "dd MMMM, yyyy H:mm:ss",
78 names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
79 namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
80 namesShort: ["ح","ن","ث","ر","خ","ج","س"]
83 names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
84 namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
88 eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
89 twoDigitYearMax: 1451,
96 F: "dd/MM/yyyy H:mm:ss",
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.
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());
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) {
133 absDays -= daysInYear;
135 else if (daysSinceJan0101 === absDays) {
137 absDays = this.daysToYear(hyear);
140 if (daysSinceJan0101 > (absDays + daysInYear)) {
141 absDays += daysInYear;
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.
148 var daysIntoYear = daysSinceJan0101 - absDays;
149 while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
153 hday = daysIntoYear - this.monthDays[hmonth];
154 return [hyear, hmonth, hday];
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);
167 isLeapYear: function(year) {
168 return ((((year * 11) + 14) % 30) < 11);
176 names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
177 namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
178 namesShort: ["ح","ن","ث","ر","خ","ج","س"]
181 names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
182 namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
186 eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
187 twoDigitYearMax: 1451,
193 f: "dd/MMMM/yyyy H:mm",
194 F: "dd/MMMM/yyyy H:mm:ss",
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],
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],
294 [1497, 679276800000],
295 [3506, 709948800000],
296 [2980, 740620800000],
297 [2890, 771206400000],
298 [2645, 801792000000],
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],
335 minDate: -2198707200000,
336 maxDate: 1873411199999,
337 toGregorian: function(hyear, hmonth, hday) {
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;
352 gdate.setDate(gdate.getDate() + days);
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;
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]) {
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) {
380 monthLength = monthLength >> 1;
381 daysInMonth = 29 + (monthLength & 1);
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];
390 Gregorian_MiddleEastFrench: {
391 name: "Gregorian_MiddleEastFrench",
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"]
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.",""]
404 eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
409 f: "dddd, MMMM dd, yyyy H:mm",
410 F: "dddd, MMMM dd, yyyy H:mm:ss",
415 name: "Gregorian_Arabic",
418 names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
419 namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
420 namesShort: ["ح","ن","ث","ر","خ","ج","س"]
423 names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
424 namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
428 eras: [{"name":"م","start":null,"offset":0}],
433 f: "dddd, MMMM dd, yyyy H:mm",
434 F: "dddd, MMMM dd, yyyy H:mm:ss"
437 Gregorian_TransliteratedEnglish: {
438 name: "Gregorian_TransliteratedEnglish",
441 names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
442 namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
443 namesShort: ["أ","ا","ث","أ","خ","ج","س"]
446 names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
447 namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
451 eras: [{"name":"م","start":null,"offset":0}],
456 f: "dddd, MMMM dd, yyyy H:mm",
457 F: "dddd, MMMM dd, yyyy H:mm:ss"