[TemporaryStorage] add files required for SDK build
[samples/web/TemporaryStorage.git] / tizen-web-ui-fw / latest / js / cultures / globalize.culture.prs-AF.js
1 /*
2  * Globalize Culture prs-AF
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( "prs-AF", "default", {
29         name: "prs-AF",
30         englishName: "Dari (Afghanistan)",
31         nativeName: "درى (افغانستان)",
32         language: "prs",
33         isRTL: true,
34         numberFormat: {
35                 pattern: ["n-"],
36                 ",": ".",
37                 ".": ",",
38                 NaN: "غ ع",
39                 negativeInfinity: "-∞",
40                 positiveInfinity: "∞",
41                 percent: {
42                         pattern: ["%n-","%n"],
43                         ",": ".",
44                         ".": ","
45                 },
46                 currency: {
47                         pattern: ["$n-","$n"],
48                         symbol: "؋"
49                 }
50         },
51         calendars: {
52                 standard: {
53                         name: "Hijri",
54                         firstDay: 5,
55                         days: {
56                                 names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
57                                 namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
58                                 namesShort: ["ح","ن","ث","ر","خ","ج","س"]
59                         },
60                         months: {
61                                 names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
62                                 namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
63                         },
64                         AM: ["غ.م","غ.م","غ.م"],
65                         PM: ["غ.و","غ.و","غ.و"],
66                         eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
67                         twoDigitYearMax: 1451,
68                         patterns: {
69                                 d: "dd/MM/yy",
70                                 D: "dd/MM/yyyy",
71                                 f: "dd/MM/yyyy h:mm tt",
72                                 F: "dd/MM/yyyy h:mm:ss tt",
73                                 M: "dd MMMM"
74                         },
75                         convert: {
76                     // Adapted to Script from System.Globalization.HijriCalendar
77                     ticks1970: 62135596800000,
78                     // number of days leading up to each month
79                     monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
80                     minDate: -42521673600000,
81                     maxDate: 253402300799999,
82                     // The number of days to add or subtract from the calendar to accommodate the variances
83                     // in the start and the end of Ramadan and to accommodate the date difference between
84                     // countries/regions. May be dynamically adjusted based on user preference, but should
85                     // remain in the range of -2 to 2, inclusive.
86                     hijriAdjustment: 0,
87                     toGregorian: function(hyear, hmonth, hday) {
88                         var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
89                         // 86400000 = ticks per day
90                         var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
91                         // adjust for timezone, because we are interested in the gregorian date for the same timezone
92                         // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
93                         // date in the current timezone.
94                         gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
95                         return gdate;
96                     },
97                     fromGregorian: function(gdate) {
98                         if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
99                         var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
100                             daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
101                         // very particular formula determined by someone smart, adapted from the server-side implementation.
102                         // it approximates the hijri year.
103                         var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
104                             absDays = this.daysToYear(hyear),
105                             daysInYear = this.isLeapYear(hyear) ? 355 : 354;
106                         // hyear is just approximate, it may need adjustment up or down by 1.
107                         if (daysSinceJan0101 < absDays) {
108                             hyear--;
109                             absDays -= daysInYear;
110                         }
111                         else if (daysSinceJan0101 === absDays) {
112                             hyear--;
113                             absDays = this.daysToYear(hyear);
114                         }
115                         else {
116                             if (daysSinceJan0101 > (absDays + daysInYear)) {
117                                 absDays += daysInYear;
118                                 hyear++;
119                             }
120                         }
121                         // determine month by looking at how many days into the hyear we are
122                         // monthDays contains the number of days up to each month.
123                         hmonth = 0;
124                         var daysIntoYear = daysSinceJan0101 - absDays;
125                         while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
126                             hmonth++;
127                         }
128                         hmonth--;
129                         hday = daysIntoYear - this.monthDays[hmonth];
130                         return [hyear, hmonth, hday];
131                     },
132                     daysToYear: function(year) {
133                         // calculates how many days since Jan 1, 0001
134                         var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
135                             yearsInto30 = year - yearsToYear30 - 1,
136                             days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
137                         while (yearsInto30 > 0) {
138                             days += (this.isLeapYear(yearsInto30) ? 355 : 354);
139                             yearsInto30--;
140                         }
141                         return days;
142                     },
143                     isLeapYear: function(year) {
144                         return ((((year * 11) + 14) % 30) < 11);
145                     }
146                         }
147                 },
148                 Gregorian_Localized: {
149                         firstDay: 5,
150                         days: {
151                                 names: ["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
152                                 namesAbbr: ["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
153                                 namesShort: ["ی","د","س","چ","پ","ج","ش"]
154                         },
155                         months: {
156                                 names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","وږى","تله","لړم","ليندۍ","مرغومى",""],
157                                 namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","وږى","تله","لړم","ليندۍ","مرغومى",""]
158                         },
159                         AM: ["غ.م","غ.م","غ.م"],
160                         PM: ["غ.و","غ.و","غ.و"],
161                         eras: [{"name":"ل.ه","start":null,"offset":0}],
162                         patterns: {
163                                 d: "yyyy/M/d",
164                                 D: "yyyy, dd, MMMM, dddd",
165                                 f: "yyyy, dd, MMMM, dddd h:mm tt",
166                                 F: "yyyy, dd, MMMM, dddd h:mm:ss tt",
167                                 M: "d MMMM",
168                                 Y: "MMMM yyyy"
169                         }
170                 }
171         }
172 });
173
174 }( this ));