[TemporaryStorage] add files required for SDK build
[samples/web/TemporaryStorage.git] / tizen-web-ui-fw / latest / js / cultures / globalize.culture.dv-MV.js
1 /*
2  * Globalize Culture dv-MV
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( "dv-MV", "default", {
29         name: "dv-MV",
30         englishName: "Divehi (Maldives)",
31         nativeName: "ދިވެހިބަސް (ދިވެހި ރާއްޖެ)",
32         language: "dv",
33         isRTL: true,
34         numberFormat: {
35                 currency: {
36                         pattern: ["n $-","n $"],
37                         symbol: "ރ."
38                 }
39         },
40         calendars: {
41                 standard: {
42                         name: "Hijri",
43                         days: {
44                                 names: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
45                                 namesAbbr: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
46                                 namesShort: ["އާ","ހޯ","އަ","ބު","ބު","ހު","ހޮ"]
47                         },
48                         months: {
49                                 names: ["މުޙައްރަމް","ޞަފަރު","ރަބީޢުލްއައްވަލް","ރަބީޢުލްއާޚިރު","ޖުމާދަލްއޫލާ","ޖުމާދަލްއާޚިރާ","ރަޖަބް","ޝަޢްބާން","ރަމަޟާން","ޝައްވާލް","ޛުލްޤަޢިދާ","ޛުލްޙިއްޖާ",""],
50                                 namesAbbr: ["މުޙައްރަމް","ޞަފަރު","ރަބީޢުލްއައްވަލް","ރަބީޢުލްއާޚިރު","ޖުމާދަލްއޫލާ","ޖުމާދަލްއާޚިރާ","ރަޖަބް","ޝަޢްބާން","ރަމަޟާން","ޝައްވާލް","ޛުލްޤަޢިދާ","ޛުލްޙިއްޖާ",""]
51                         },
52                         AM: ["މކ","މކ","މކ"],
53                         PM: ["މފ","މފ","މފ"],
54                         eras: [{"name":"ހިޖްރީ","start":null,"offset":0}],
55                         twoDigitYearMax: 1451,
56                         patterns: {
57                                 d: "dd/MM/yy",
58                                 D: "dd/MM/yyyy",
59                                 t: "HH:mm",
60                                 T: "HH:mm:ss",
61                                 f: "dd/MM/yyyy HH:mm",
62                                 F: "dd/MM/yyyy HH:mm:ss",
63                                 M: "dd MMMM"
64                         },
65                         convert: {
66                     // Adapted to Script from System.Globalization.HijriCalendar
67                     ticks1970: 62135596800000,
68                     // number of days leading up to each month
69                     monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
70                     minDate: -42521673600000,
71                     maxDate: 253402300799999,
72                     // The number of days to add or subtract from the calendar to accommodate the variances
73                     // in the start and the end of Ramadan and to accommodate the date difference between
74                     // countries/regions. May be dynamically adjusted based on user preference, but should
75                     // remain in the range of -2 to 2, inclusive.
76                     hijriAdjustment: 0,
77                     toGregorian: function(hyear, hmonth, hday) {
78                         var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
79                         // 86400000 = ticks per day
80                         var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
81                         // adjust for timezone, because we are interested in the gregorian date for the same timezone
82                         // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
83                         // date in the current timezone.
84                         gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
85                         return gdate;
86                     },
87                     fromGregorian: function(gdate) {
88                         if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
89                         var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
90                             daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
91                         // very particular formula determined by someone smart, adapted from the server-side implementation.
92                         // it approximates the hijri year.
93                         var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
94                             absDays = this.daysToYear(hyear),
95                             daysInYear = this.isLeapYear(hyear) ? 355 : 354;
96                         // hyear is just approximate, it may need adjustment up or down by 1.
97                         if (daysSinceJan0101 < absDays) {
98                             hyear--;
99                             absDays -= daysInYear;
100                         }
101                         else if (daysSinceJan0101 === absDays) {
102                             hyear--;
103                             absDays = this.daysToYear(hyear);
104                         }
105                         else {
106                             if (daysSinceJan0101 > (absDays + daysInYear)) {
107                                 absDays += daysInYear;
108                                 hyear++;
109                             }
110                         }
111                         // determine month by looking at how many days into the hyear we are
112                         // monthDays contains the number of days up to each month.
113                         hmonth = 0;
114                         var daysIntoYear = daysSinceJan0101 - absDays;
115                         while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
116                             hmonth++;
117                         }
118                         hmonth--;
119                         hday = daysIntoYear - this.monthDays[hmonth];
120                         return [hyear, hmonth, hday];
121                     },
122                     daysToYear: function(year) {
123                         // calculates how many days since Jan 1, 0001
124                         var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
125                             yearsInto30 = year - yearsToYear30 - 1,
126                             days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
127                         while (yearsInto30 > 0) {
128                             days += (this.isLeapYear(yearsInto30) ? 355 : 354);
129                             yearsInto30--;
130                         }
131                         return days;
132                     },
133                     isLeapYear: function(year) {
134                         return ((((year * 11) + 14) % 30) < 11);
135                     }
136                         }
137                 },
138                 Gregorian_Localized: {
139                         days: {
140                                 names: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
141                                 namesAbbr: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
142                                 namesShort: ["އާ","ހޯ","އަ","ބު","ބު","ހު","ހޮ"]
143                         },
144                         months: {
145                                 names: ["ޖަނަވަރީ","ފެބްރުއަރީ","މާޗް","އޭޕްރިލް","މެއި","ޖޫން","ޖުލައި","އޯގަސްޓް","ސެޕްޓެމްބަރ","އޮކްޓޯބަރ","ނޮވެމްބަރ","ޑިސެމްބަރ",""],
146                                 namesAbbr: ["ޖަނަވަރީ","ފެބްރުއަރީ","މާޗް","އޭޕްރިލް","މެއި","ޖޫން","ޖުލައި","އޯގަސްޓް","ސެޕްޓެމްބަރ","އޮކްޓޯބަރ","ނޮވެމްބަރ","ޑިސެމްބަރ",""]
147                         },
148                         AM: ["މކ","މކ","މކ"],
149                         PM: ["މފ","މފ","މފ"],
150                         eras: [{"name":"މީލާދީ","start":null,"offset":0}],
151                         patterns: {
152                                 d: "dd/MM/yy",
153                                 D: "ddd, yyyy MMMM dd",
154                                 t: "HH:mm",
155                                 T: "HH:mm:ss",
156                                 f: "ddd, yyyy MMMM dd HH:mm",
157                                 F: "ddd, yyyy MMMM dd HH:mm:ss",
158                                 Y: "yyyy, MMMM"
159                         }
160                 }
161         }
162 });
163
164 }( this ));