@multisystemsuite/timezone-engine-world-data 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-DRDF6QPV.cjs +225 -0
- package/dist/chunk-DRDF6QPV.cjs.map +1 -0
- package/dist/chunk-GA43RKAR.cjs +301 -0
- package/dist/chunk-GA43RKAR.cjs.map +1 -0
- package/dist/chunk-RQEQPR6L.js +218 -0
- package/dist/chunk-RQEQPR6L.js.map +1 -0
- package/dist/chunk-SGH7TEFO.cjs +261 -0
- package/dist/chunk-SGH7TEFO.cjs.map +1 -0
- package/dist/chunk-TNKJ4FJU.js +295 -0
- package/dist/chunk-TNKJ4FJU.js.map +1 -0
- package/dist/chunk-ZEM6FGFI.js +253 -0
- package/dist/chunk-ZEM6FGFI.js.map +1 -0
- package/dist/countries.cjs +32 -0
- package/dist/countries.cjs.map +1 -0
- package/dist/countries.d.cts +12 -0
- package/dist/countries.d.ts +12 -0
- package/dist/countries.js +3 -0
- package/dist/countries.js.map +1 -0
- package/dist/index.cjs +82 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/locales.cjs +36 -0
- package/dist/locales.cjs.map +1 -0
- package/dist/locales.d.cts +14 -0
- package/dist/locales.d.ts +14 -0
- package/dist/locales.js +3 -0
- package/dist/locales.js.map +1 -0
- package/dist/timezones.cjs +28 -0
- package/dist/timezones.cjs.map +1 -0
- package/dist/timezones.d.cts +10 -0
- package/dist/timezones.d.ts +10 -0
- package/dist/timezones.js +3 -0
- package/dist/timezones.js.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
// src/countries.ts
|
|
2
|
+
var COUNTRY_TIMEZONE_MAP = {
|
|
3
|
+
IN: {
|
|
4
|
+
countryCode: "IN",
|
|
5
|
+
country: "India",
|
|
6
|
+
timezones: ["Asia/Kolkata"],
|
|
7
|
+
defaultTimezone: "Asia/Kolkata"
|
|
8
|
+
},
|
|
9
|
+
US: {
|
|
10
|
+
countryCode: "US",
|
|
11
|
+
country: "United States",
|
|
12
|
+
timezones: [
|
|
13
|
+
"America/New_York",
|
|
14
|
+
"America/Chicago",
|
|
15
|
+
"America/Denver",
|
|
16
|
+
"America/Los_Angeles"
|
|
17
|
+
],
|
|
18
|
+
defaultTimezone: "America/New_York"
|
|
19
|
+
},
|
|
20
|
+
GB: {
|
|
21
|
+
countryCode: "GB",
|
|
22
|
+
country: "United Kingdom",
|
|
23
|
+
timezones: ["Europe/London"],
|
|
24
|
+
defaultTimezone: "Europe/London"
|
|
25
|
+
},
|
|
26
|
+
JP: {
|
|
27
|
+
countryCode: "JP",
|
|
28
|
+
country: "Japan",
|
|
29
|
+
timezones: ["Asia/Tokyo"],
|
|
30
|
+
defaultTimezone: "Asia/Tokyo"
|
|
31
|
+
},
|
|
32
|
+
AU: {
|
|
33
|
+
countryCode: "AU",
|
|
34
|
+
country: "Australia",
|
|
35
|
+
timezones: ["Australia/Sydney"],
|
|
36
|
+
defaultTimezone: "Australia/Sydney"
|
|
37
|
+
},
|
|
38
|
+
FR: {
|
|
39
|
+
countryCode: "FR",
|
|
40
|
+
country: "France",
|
|
41
|
+
timezones: ["Europe/Paris"],
|
|
42
|
+
defaultTimezone: "Europe/Paris"
|
|
43
|
+
},
|
|
44
|
+
DE: {
|
|
45
|
+
countryCode: "DE",
|
|
46
|
+
country: "Germany",
|
|
47
|
+
timezones: ["Europe/Berlin"],
|
|
48
|
+
defaultTimezone: "Europe/Berlin"
|
|
49
|
+
},
|
|
50
|
+
CN: {
|
|
51
|
+
countryCode: "CN",
|
|
52
|
+
country: "China",
|
|
53
|
+
timezones: ["Asia/Shanghai"],
|
|
54
|
+
defaultTimezone: "Asia/Shanghai"
|
|
55
|
+
},
|
|
56
|
+
AE: {
|
|
57
|
+
countryCode: "AE",
|
|
58
|
+
country: "United Arab Emirates",
|
|
59
|
+
timezones: ["Asia/Dubai"],
|
|
60
|
+
defaultTimezone: "Asia/Dubai"
|
|
61
|
+
},
|
|
62
|
+
SG: {
|
|
63
|
+
countryCode: "SG",
|
|
64
|
+
country: "Singapore",
|
|
65
|
+
timezones: ["Asia/Singapore"],
|
|
66
|
+
defaultTimezone: "Asia/Singapore"
|
|
67
|
+
},
|
|
68
|
+
CA: {
|
|
69
|
+
countryCode: "CA",
|
|
70
|
+
country: "Canada",
|
|
71
|
+
timezones: ["America/Toronto"],
|
|
72
|
+
defaultTimezone: "America/Toronto"
|
|
73
|
+
},
|
|
74
|
+
BR: {
|
|
75
|
+
countryCode: "BR",
|
|
76
|
+
country: "Brazil",
|
|
77
|
+
timezones: ["America/Sao_Paulo"],
|
|
78
|
+
defaultTimezone: "America/Sao_Paulo"
|
|
79
|
+
},
|
|
80
|
+
RU: {
|
|
81
|
+
countryCode: "RU",
|
|
82
|
+
country: "Russia",
|
|
83
|
+
timezones: ["Europe/Moscow"],
|
|
84
|
+
defaultTimezone: "Europe/Moscow"
|
|
85
|
+
},
|
|
86
|
+
KR: {
|
|
87
|
+
countryCode: "KR",
|
|
88
|
+
country: "South Korea",
|
|
89
|
+
timezones: ["Asia/Seoul"],
|
|
90
|
+
defaultTimezone: "Asia/Seoul"
|
|
91
|
+
},
|
|
92
|
+
SA: {
|
|
93
|
+
countryCode: "SA",
|
|
94
|
+
country: "Saudi Arabia",
|
|
95
|
+
timezones: ["Asia/Riyadh"],
|
|
96
|
+
defaultTimezone: "Asia/Riyadh"
|
|
97
|
+
},
|
|
98
|
+
MX: {
|
|
99
|
+
countryCode: "MX",
|
|
100
|
+
country: "Mexico",
|
|
101
|
+
timezones: ["America/Mexico_City"],
|
|
102
|
+
defaultTimezone: "America/Mexico_City"
|
|
103
|
+
},
|
|
104
|
+
NZ: {
|
|
105
|
+
countryCode: "NZ",
|
|
106
|
+
country: "New Zealand",
|
|
107
|
+
timezones: ["Pacific/Auckland"],
|
|
108
|
+
defaultTimezone: "Pacific/Auckland"
|
|
109
|
+
},
|
|
110
|
+
ZA: {
|
|
111
|
+
countryCode: "ZA",
|
|
112
|
+
country: "South Africa",
|
|
113
|
+
timezones: ["Africa/Johannesburg"],
|
|
114
|
+
defaultTimezone: "Africa/Johannesburg"
|
|
115
|
+
},
|
|
116
|
+
EG: {
|
|
117
|
+
countryCode: "EG",
|
|
118
|
+
country: "Egypt",
|
|
119
|
+
timezones: ["Africa/Cairo"],
|
|
120
|
+
defaultTimezone: "Africa/Cairo"
|
|
121
|
+
},
|
|
122
|
+
NL: {
|
|
123
|
+
countryCode: "NL",
|
|
124
|
+
country: "Netherlands",
|
|
125
|
+
timezones: ["Europe/Amsterdam"],
|
|
126
|
+
defaultTimezone: "Europe/Amsterdam"
|
|
127
|
+
},
|
|
128
|
+
ES: {
|
|
129
|
+
countryCode: "ES",
|
|
130
|
+
country: "Spain",
|
|
131
|
+
timezones: ["Europe/Madrid"],
|
|
132
|
+
defaultTimezone: "Europe/Madrid"
|
|
133
|
+
},
|
|
134
|
+
IT: {
|
|
135
|
+
countryCode: "IT",
|
|
136
|
+
country: "Italy",
|
|
137
|
+
timezones: ["Europe/Rome"],
|
|
138
|
+
defaultTimezone: "Europe/Rome"
|
|
139
|
+
},
|
|
140
|
+
TH: {
|
|
141
|
+
countryCode: "TH",
|
|
142
|
+
country: "Thailand",
|
|
143
|
+
timezones: ["Asia/Bangkok"],
|
|
144
|
+
defaultTimezone: "Asia/Bangkok"
|
|
145
|
+
},
|
|
146
|
+
ID: {
|
|
147
|
+
countryCode: "ID",
|
|
148
|
+
country: "Indonesia",
|
|
149
|
+
timezones: ["Asia/Jakarta"],
|
|
150
|
+
defaultTimezone: "Asia/Jakarta"
|
|
151
|
+
},
|
|
152
|
+
PK: {
|
|
153
|
+
countryCode: "PK",
|
|
154
|
+
country: "Pakistan",
|
|
155
|
+
timezones: ["Asia/Karachi"],
|
|
156
|
+
defaultTimezone: "Asia/Karachi"
|
|
157
|
+
},
|
|
158
|
+
AR: {
|
|
159
|
+
countryCode: "AR",
|
|
160
|
+
country: "Argentina",
|
|
161
|
+
timezones: ["America/Buenos_Aires"],
|
|
162
|
+
defaultTimezone: "America/Buenos_Aires"
|
|
163
|
+
},
|
|
164
|
+
HK: {
|
|
165
|
+
countryCode: "HK",
|
|
166
|
+
country: "Hong Kong",
|
|
167
|
+
timezones: ["Asia/Hong_Kong"],
|
|
168
|
+
defaultTimezone: "Asia/Hong_Kong"
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
var CITY_TIMEZONE_MAP = {
|
|
172
|
+
kolkata: { city: "Kolkata", countryCode: "IN", timezone: "Asia/Kolkata" },
|
|
173
|
+
mumbai: { city: "Mumbai", countryCode: "IN", timezone: "Asia/Kolkata" },
|
|
174
|
+
delhi: { city: "Delhi", countryCode: "IN", timezone: "Asia/Kolkata" },
|
|
175
|
+
"new york": { city: "New York", countryCode: "US", timezone: "America/New_York" },
|
|
176
|
+
london: { city: "London", countryCode: "GB", timezone: "Europe/London" },
|
|
177
|
+
tokyo: { city: "Tokyo", countryCode: "JP", timezone: "Asia/Tokyo" },
|
|
178
|
+
sydney: { city: "Sydney", countryCode: "AU", timezone: "Australia/Sydney" },
|
|
179
|
+
paris: { city: "Paris", countryCode: "FR", timezone: "Europe/Paris" },
|
|
180
|
+
chicago: { city: "Chicago", countryCode: "US", timezone: "America/Chicago" },
|
|
181
|
+
"los angeles": { city: "Los Angeles", countryCode: "US", timezone: "America/Los_Angeles" },
|
|
182
|
+
berlin: { city: "Berlin", countryCode: "DE", timezone: "Europe/Berlin" },
|
|
183
|
+
dubai: { city: "Dubai", countryCode: "AE", timezone: "Asia/Dubai" },
|
|
184
|
+
shanghai: { city: "Shanghai", countryCode: "CN", timezone: "Asia/Shanghai" },
|
|
185
|
+
singapore: { city: "Singapore", countryCode: "SG", timezone: "Asia/Singapore" },
|
|
186
|
+
"hong kong": { city: "Hong Kong", countryCode: "HK", timezone: "Asia/Hong_Kong" },
|
|
187
|
+
seoul: { city: "Seoul", countryCode: "KR", timezone: "Asia/Seoul" },
|
|
188
|
+
moscow: { city: "Moscow", countryCode: "RU", timezone: "Europe/Moscow" },
|
|
189
|
+
toronto: { city: "Toronto", countryCode: "CA", timezone: "America/Toronto" },
|
|
190
|
+
"sao paulo": { city: "S\xE3o Paulo", countryCode: "BR", timezone: "America/Sao_Paulo" },
|
|
191
|
+
amsterdam: { city: "Amsterdam", countryCode: "NL", timezone: "Europe/Amsterdam" },
|
|
192
|
+
madrid: { city: "Madrid", countryCode: "ES", timezone: "Europe/Madrid" },
|
|
193
|
+
rome: { city: "Rome", countryCode: "IT", timezone: "Europe/Rome" },
|
|
194
|
+
bangkok: { city: "Bangkok", countryCode: "TH", timezone: "Asia/Bangkok" },
|
|
195
|
+
jakarta: { city: "Jakarta", countryCode: "ID", timezone: "Asia/Jakarta" },
|
|
196
|
+
karachi: { city: "Karachi", countryCode: "PK", timezone: "Asia/Karachi" },
|
|
197
|
+
riyadh: { city: "Riyadh", countryCode: "SA", timezone: "Asia/Riyadh" },
|
|
198
|
+
"mexico city": { city: "Mexico City", countryCode: "MX", timezone: "America/Mexico_City" },
|
|
199
|
+
auckland: { city: "Auckland", countryCode: "NZ", timezone: "Pacific/Auckland" },
|
|
200
|
+
cairo: { city: "Cairo", countryCode: "EG", timezone: "Africa/Cairo" },
|
|
201
|
+
johannesburg: { city: "Johannesburg", countryCode: "ZA", timezone: "Africa/Johannesburg" }
|
|
202
|
+
};
|
|
203
|
+
function getCountryTimezones(countryCode) {
|
|
204
|
+
return COUNTRY_TIMEZONE_MAP[countryCode.toUpperCase()];
|
|
205
|
+
}
|
|
206
|
+
function getCityTimezone(city) {
|
|
207
|
+
return CITY_TIMEZONE_MAP[city.toLowerCase().trim()];
|
|
208
|
+
}
|
|
209
|
+
function listCountries() {
|
|
210
|
+
return Object.values(COUNTRY_TIMEZONE_MAP);
|
|
211
|
+
}
|
|
212
|
+
function listCities() {
|
|
213
|
+
return Object.values(CITY_TIMEZONE_MAP);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export { CITY_TIMEZONE_MAP, COUNTRY_TIMEZONE_MAP, getCityTimezone, getCountryTimezones, listCities, listCountries };
|
|
217
|
+
//# sourceMappingURL=chunk-RQEQPR6L.js.map
|
|
218
|
+
//# sourceMappingURL=chunk-RQEQPR6L.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/countries.ts"],"names":[],"mappings":";AAMO,IAAM,oBAAA,GAA+D;AAAA,EAC1E,EAAA,EAAI;AAAA,IACF,WAAA,EAAa,IAAA;AAAA,IACb,OAAA,EAAS,OAAA;AAAA,IACT,SAAA,EAAW,CAAC,cAAc,CAAA;AAAA,IAC1B,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,EAAA,EAAI;AAAA,IACF,WAAA,EAAa,IAAA;AAAA,IACb,OAAA,EAAS,eAAA;AAAA,IACT,SAAA,EAAW;AAAA,MACT,kBAAA;AAAA,MACA,iBAAA;AAAA,MACA,gBAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,EAAA,EAAI;AAAA,IACF,WAAA,EAAa,IAAA;AAAA,IACb,OAAA,EAAS,gBAAA;AAAA,IACT,SAAA,EAAW,CAAC,eAAe,CAAA;AAAA,IAC3B,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,EAAA,EAAI;AAAA,IACF,WAAA,EAAa,IAAA;AAAA,IACb,OAAA,EAAS,OAAA;AAAA,IACT,SAAA,EAAW,CAAC,YAAY,CAAA;AAAA,IACxB,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,EAAA,EAAI;AAAA,IACF,WAAA,EAAa,IAAA;AAAA,IACb,OAAA,EAAS,WAAA;AAAA,IACT,SAAA,EAAW,CAAC,kBAAkB,CAAA;AAAA,IAC9B,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,EAAA,EAAI;AAAA,IACF,WAAA,EAAa,IAAA;AA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,CAAY,WAAA,EAAa,CAAA;AACvD;AAEO,SAAS,gBAAgB,IAAA,EAA+C;AAC7E,EAAA,OAAO,iBAAA,CAAkB,IAAA,CAAK,WAAA,EAAY,CAAE,MAAM,CAAA;AACpD;AAEO,SAAS,aAAA,GAA0C;AACxD,EAAA,OAAO,MAAA,CAAO,OAAO,oBAAoB,CAAA;AAC3C;AAEO,SAAS,UAAA,GAAoC;AAClD,EAAA,OAAO,MAAA,CAAO,OAAO,iBAAiB,CAAA;AACxC","file":"chunk-RQEQPR6L.js","sourcesContent":["import type {\n CountryTimezoneMapping,\n CityTimezoneMapping,\n} from \"@multisystemsuite/timezone-engine-shared-types\";\n\n/** Country-to-timezone mappings — offline-first */\nexport const COUNTRY_TIMEZONE_MAP: Record<string, CountryTimezoneMapping> = {\n IN: {\n countryCode: \"IN\",\n country: \"India\",\n timezones: [\"Asia/Kolkata\"],\n defaultTimezone: \"Asia/Kolkata\",\n },\n US: {\n countryCode: \"US\",\n country: \"United States\",\n timezones: [\n \"America/New_York\",\n \"America/Chicago\",\n \"America/Denver\",\n \"America/Los_Angeles\",\n ],\n defaultTimezone: \"America/New_York\",\n },\n GB: {\n countryCode: \"GB\",\n country: \"United Kingdom\",\n timezones: [\"Europe/London\"],\n defaultTimezone: \"Europe/London\",\n },\n JP: {\n countryCode: \"JP\",\n country: \"Japan\",\n timezones: [\"Asia/Tokyo\"],\n defaultTimezone: \"Asia/Tokyo\",\n },\n AU: {\n countryCode: \"AU\",\n country: \"Australia\",\n timezones: [\"Australia/Sydney\"],\n defaultTimezone: \"Australia/Sydney\",\n },\n FR: {\n countryCode: \"FR\",\n country: \"France\",\n timezones: [\"Europe/Paris\"],\n defaultTimezone: \"Europe/Paris\",\n },\n DE: {\n countryCode: \"DE\",\n country: \"Germany\",\n timezones: [\"Europe/Berlin\"],\n defaultTimezone: \"Europe/Berlin\",\n },\n CN: {\n countryCode: \"CN\",\n country: \"China\",\n timezones: [\"Asia/Shanghai\"],\n defaultTimezone: \"Asia/Shanghai\",\n },\n AE: {\n countryCode: \"AE\",\n country: \"United Arab Emirates\",\n timezones: [\"Asia/Dubai\"],\n defaultTimezone: \"Asia/Dubai\",\n },\n SG: {\n countryCode: \"SG\",\n country: \"Singapore\",\n timezones: [\"Asia/Singapore\"],\n defaultTimezone: \"Asia/Singapore\",\n },\n CA: {\n countryCode: \"CA\",\n country: \"Canada\",\n timezones: [\"America/Toronto\"],\n defaultTimezone: \"America/Toronto\",\n },\n BR: {\n countryCode: \"BR\",\n country: \"Brazil\",\n timezones: [\"America/Sao_Paulo\"],\n defaultTimezone: \"America/Sao_Paulo\",\n },\n RU: {\n countryCode: \"RU\",\n country: \"Russia\",\n timezones: [\"Europe/Moscow\"],\n defaultTimezone: \"Europe/Moscow\",\n },\n KR: {\n countryCode: \"KR\",\n country: \"South Korea\",\n timezones: [\"Asia/Seoul\"],\n defaultTimezone: \"Asia/Seoul\",\n },\n SA: {\n countryCode: \"SA\",\n country: \"Saudi Arabia\",\n timezones: [\"Asia/Riyadh\"],\n defaultTimezone: \"Asia/Riyadh\",\n },\n MX: {\n countryCode: \"MX\",\n country: \"Mexico\",\n timezones: [\"America/Mexico_City\"],\n defaultTimezone: \"America/Mexico_City\",\n },\n NZ: {\n countryCode: \"NZ\",\n country: \"New Zealand\",\n timezones: [\"Pacific/Auckland\"],\n defaultTimezone: \"Pacific/Auckland\",\n },\n ZA: {\n countryCode: \"ZA\",\n country: \"South Africa\",\n timezones: [\"Africa/Johannesburg\"],\n defaultTimezone: \"Africa/Johannesburg\",\n },\n EG: {\n countryCode: \"EG\",\n country: \"Egypt\",\n timezones: [\"Africa/Cairo\"],\n defaultTimezone: \"Africa/Cairo\",\n },\n NL: {\n countryCode: \"NL\",\n country: \"Netherlands\",\n timezones: [\"Europe/Amsterdam\"],\n defaultTimezone: \"Europe/Amsterdam\",\n },\n ES: {\n countryCode: \"ES\",\n country: \"Spain\",\n timezones: [\"Europe/Madrid\"],\n defaultTimezone: \"Europe/Madrid\",\n },\n IT: {\n countryCode: \"IT\",\n country: \"Italy\",\n timezones: [\"Europe/Rome\"],\n defaultTimezone: \"Europe/Rome\",\n },\n TH: {\n countryCode: \"TH\",\n country: \"Thailand\",\n timezones: [\"Asia/Bangkok\"],\n defaultTimezone: \"Asia/Bangkok\",\n },\n ID: {\n countryCode: \"ID\",\n country: \"Indonesia\",\n timezones: [\"Asia/Jakarta\"],\n defaultTimezone: \"Asia/Jakarta\",\n },\n PK: {\n countryCode: \"PK\",\n country: \"Pakistan\",\n timezones: [\"Asia/Karachi\"],\n defaultTimezone: \"Asia/Karachi\",\n },\n AR: {\n countryCode: \"AR\",\n country: \"Argentina\",\n timezones: [\"America/Buenos_Aires\"],\n defaultTimezone: \"America/Buenos_Aires\",\n },\n HK: {\n countryCode: \"HK\",\n country: \"Hong Kong\",\n timezones: [\"Asia/Hong_Kong\"],\n defaultTimezone: \"Asia/Hong_Kong\",\n },\n};\n\n/** City-to-timezone mappings — offline-first */\nexport const CITY_TIMEZONE_MAP: Record<string, CityTimezoneMapping> = {\n kolkata: { city: \"Kolkata\", countryCode: \"IN\", timezone: \"Asia/Kolkata\" },\n mumbai: { city: \"Mumbai\", countryCode: \"IN\", timezone: \"Asia/Kolkata\" },\n delhi: { city: \"Delhi\", countryCode: \"IN\", timezone: \"Asia/Kolkata\" },\n \"new york\": { city: \"New York\", countryCode: \"US\", timezone: \"America/New_York\" },\n london: { city: \"London\", countryCode: \"GB\", timezone: \"Europe/London\" },\n tokyo: { city: \"Tokyo\", countryCode: \"JP\", timezone: \"Asia/Tokyo\" },\n sydney: { city: \"Sydney\", countryCode: \"AU\", timezone: \"Australia/Sydney\" },\n paris: { city: \"Paris\", countryCode: \"FR\", timezone: \"Europe/Paris\" },\n chicago: { city: \"Chicago\", countryCode: \"US\", timezone: \"America/Chicago\" },\n \"los angeles\": { city: \"Los Angeles\", countryCode: \"US\", timezone: \"America/Los_Angeles\" },\n berlin: { city: \"Berlin\", countryCode: \"DE\", timezone: \"Europe/Berlin\" },\n dubai: { city: \"Dubai\", countryCode: \"AE\", timezone: \"Asia/Dubai\" },\n shanghai: { city: \"Shanghai\", countryCode: \"CN\", timezone: \"Asia/Shanghai\" },\n singapore: { city: \"Singapore\", countryCode: \"SG\", timezone: \"Asia/Singapore\" },\n \"hong kong\": { city: \"Hong Kong\", countryCode: \"HK\", timezone: \"Asia/Hong_Kong\" },\n seoul: { city: \"Seoul\", countryCode: \"KR\", timezone: \"Asia/Seoul\" },\n moscow: { city: \"Moscow\", countryCode: \"RU\", timezone: \"Europe/Moscow\" },\n toronto: { city: \"Toronto\", countryCode: \"CA\", timezone: \"America/Toronto\" },\n \"sao paulo\": { city: \"São Paulo\", countryCode: \"BR\", timezone: \"America/Sao_Paulo\" },\n amsterdam: { city: \"Amsterdam\", countryCode: \"NL\", timezone: \"Europe/Amsterdam\" },\n madrid: { city: \"Madrid\", countryCode: \"ES\", timezone: \"Europe/Madrid\" },\n rome: { city: \"Rome\", countryCode: \"IT\", timezone: \"Europe/Rome\" },\n bangkok: { city: \"Bangkok\", countryCode: \"TH\", timezone: \"Asia/Bangkok\" },\n jakarta: { city: \"Jakarta\", countryCode: \"ID\", timezone: \"Asia/Jakarta\" },\n karachi: { city: \"Karachi\", countryCode: \"PK\", timezone: \"Asia/Karachi\" },\n riyadh: { city: \"Riyadh\", countryCode: \"SA\", timezone: \"Asia/Riyadh\" },\n \"mexico city\": { city: \"Mexico City\", countryCode: \"MX\", timezone: \"America/Mexico_City\" },\n auckland: { city: \"Auckland\", countryCode: \"NZ\", timezone: \"Pacific/Auckland\" },\n cairo: { city: \"Cairo\", countryCode: \"EG\", timezone: \"Africa/Cairo\" },\n johannesburg: { city: \"Johannesburg\", countryCode: \"ZA\", timezone: \"Africa/Johannesburg\" },\n};\n\nexport function getCountryTimezones(countryCode: string): CountryTimezoneMapping | undefined {\n return COUNTRY_TIMEZONE_MAP[countryCode.toUpperCase()];\n}\n\nexport function getCityTimezone(city: string): CityTimezoneMapping | undefined {\n return CITY_TIMEZONE_MAP[city.toLowerCase().trim()];\n}\n\nexport function listCountries(): CountryTimezoneMapping[] {\n return Object.values(COUNTRY_TIMEZONE_MAP);\n}\n\nexport function listCities(): CityTimezoneMapping[] {\n return Object.values(CITY_TIMEZONE_MAP);\n}\n"]}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/locales.ts
|
|
4
|
+
var LOCALE_METADATA = {
|
|
5
|
+
"en-US": {
|
|
6
|
+
locale: "en-US",
|
|
7
|
+
language: "English",
|
|
8
|
+
region: "United States",
|
|
9
|
+
dateFormat: "US",
|
|
10
|
+
timeFormat: "12h",
|
|
11
|
+
firstDayOfWeek: 0
|
|
12
|
+
},
|
|
13
|
+
"en-GB": {
|
|
14
|
+
locale: "en-GB",
|
|
15
|
+
language: "English",
|
|
16
|
+
region: "United Kingdom",
|
|
17
|
+
dateFormat: "UK",
|
|
18
|
+
timeFormat: "24h",
|
|
19
|
+
firstDayOfWeek: 1
|
|
20
|
+
},
|
|
21
|
+
"en-IN": {
|
|
22
|
+
locale: "en-IN",
|
|
23
|
+
language: "English",
|
|
24
|
+
region: "India",
|
|
25
|
+
dateFormat: "IN",
|
|
26
|
+
timeFormat: "12h",
|
|
27
|
+
firstDayOfWeek: 0
|
|
28
|
+
},
|
|
29
|
+
"ja-JP": {
|
|
30
|
+
locale: "ja-JP",
|
|
31
|
+
language: "Japanese",
|
|
32
|
+
region: "Japan",
|
|
33
|
+
dateFormat: "JP",
|
|
34
|
+
timeFormat: "24h",
|
|
35
|
+
firstDayOfWeek: 0
|
|
36
|
+
},
|
|
37
|
+
"fr-FR": {
|
|
38
|
+
locale: "fr-FR",
|
|
39
|
+
language: "French",
|
|
40
|
+
region: "France",
|
|
41
|
+
dateFormat: "EU",
|
|
42
|
+
timeFormat: "24h",
|
|
43
|
+
firstDayOfWeek: 1
|
|
44
|
+
},
|
|
45
|
+
"de-DE": {
|
|
46
|
+
locale: "de-DE",
|
|
47
|
+
language: "German",
|
|
48
|
+
region: "Germany",
|
|
49
|
+
dateFormat: "EU",
|
|
50
|
+
timeFormat: "24h",
|
|
51
|
+
firstDayOfWeek: 1
|
|
52
|
+
},
|
|
53
|
+
"ar-AE": {
|
|
54
|
+
locale: "ar-AE",
|
|
55
|
+
language: "Arabic",
|
|
56
|
+
region: "UAE",
|
|
57
|
+
dateFormat: "AR",
|
|
58
|
+
timeFormat: "12h",
|
|
59
|
+
firstDayOfWeek: 6
|
|
60
|
+
},
|
|
61
|
+
"ar-SA": {
|
|
62
|
+
locale: "ar-SA",
|
|
63
|
+
language: "Arabic",
|
|
64
|
+
region: "Saudi Arabia",
|
|
65
|
+
dateFormat: "AR",
|
|
66
|
+
timeFormat: "12h",
|
|
67
|
+
firstDayOfWeek: 6
|
|
68
|
+
},
|
|
69
|
+
"zh-CN": {
|
|
70
|
+
locale: "zh-CN",
|
|
71
|
+
language: "Chinese",
|
|
72
|
+
region: "China",
|
|
73
|
+
dateFormat: "CN",
|
|
74
|
+
timeFormat: "24h",
|
|
75
|
+
firstDayOfWeek: 1
|
|
76
|
+
},
|
|
77
|
+
"zh-HK": {
|
|
78
|
+
locale: "zh-HK",
|
|
79
|
+
language: "Chinese",
|
|
80
|
+
region: "Hong Kong",
|
|
81
|
+
dateFormat: "CN",
|
|
82
|
+
timeFormat: "12h",
|
|
83
|
+
firstDayOfWeek: 0
|
|
84
|
+
},
|
|
85
|
+
"ko-KR": {
|
|
86
|
+
locale: "ko-KR",
|
|
87
|
+
language: "Korean",
|
|
88
|
+
region: "South Korea",
|
|
89
|
+
dateFormat: "ISO",
|
|
90
|
+
timeFormat: "12h",
|
|
91
|
+
firstDayOfWeek: 0
|
|
92
|
+
},
|
|
93
|
+
"pt-BR": {
|
|
94
|
+
locale: "pt-BR",
|
|
95
|
+
language: "Portuguese",
|
|
96
|
+
region: "Brazil",
|
|
97
|
+
dateFormat: "EU",
|
|
98
|
+
timeFormat: "24h",
|
|
99
|
+
firstDayOfWeek: 0
|
|
100
|
+
},
|
|
101
|
+
"es-ES": {
|
|
102
|
+
locale: "es-ES",
|
|
103
|
+
language: "Spanish",
|
|
104
|
+
region: "Spain",
|
|
105
|
+
dateFormat: "EU",
|
|
106
|
+
timeFormat: "24h",
|
|
107
|
+
firstDayOfWeek: 1
|
|
108
|
+
},
|
|
109
|
+
"it-IT": {
|
|
110
|
+
locale: "it-IT",
|
|
111
|
+
language: "Italian",
|
|
112
|
+
region: "Italy",
|
|
113
|
+
dateFormat: "EU",
|
|
114
|
+
timeFormat: "24h",
|
|
115
|
+
firstDayOfWeek: 1
|
|
116
|
+
},
|
|
117
|
+
"nl-NL": {
|
|
118
|
+
locale: "nl-NL",
|
|
119
|
+
language: "Dutch",
|
|
120
|
+
region: "Netherlands",
|
|
121
|
+
dateFormat: "EU",
|
|
122
|
+
timeFormat: "24h",
|
|
123
|
+
firstDayOfWeek: 1
|
|
124
|
+
},
|
|
125
|
+
"ru-RU": {
|
|
126
|
+
locale: "ru-RU",
|
|
127
|
+
language: "Russian",
|
|
128
|
+
region: "Russia",
|
|
129
|
+
dateFormat: "EU",
|
|
130
|
+
timeFormat: "24h",
|
|
131
|
+
firstDayOfWeek: 1
|
|
132
|
+
},
|
|
133
|
+
"en-AU": {
|
|
134
|
+
locale: "en-AU",
|
|
135
|
+
language: "English",
|
|
136
|
+
region: "Australia",
|
|
137
|
+
dateFormat: "UK",
|
|
138
|
+
timeFormat: "12h",
|
|
139
|
+
firstDayOfWeek: 1
|
|
140
|
+
},
|
|
141
|
+
"en-CA": {
|
|
142
|
+
locale: "en-CA",
|
|
143
|
+
language: "English",
|
|
144
|
+
region: "Canada",
|
|
145
|
+
dateFormat: "US",
|
|
146
|
+
timeFormat: "12h",
|
|
147
|
+
firstDayOfWeek: 0
|
|
148
|
+
},
|
|
149
|
+
"en-SG": {
|
|
150
|
+
locale: "en-SG",
|
|
151
|
+
language: "English",
|
|
152
|
+
region: "Singapore",
|
|
153
|
+
dateFormat: "UK",
|
|
154
|
+
timeFormat: "12h",
|
|
155
|
+
firstDayOfWeek: 0
|
|
156
|
+
},
|
|
157
|
+
"th-TH": {
|
|
158
|
+
locale: "th-TH",
|
|
159
|
+
language: "Thai",
|
|
160
|
+
region: "Thailand",
|
|
161
|
+
dateFormat: "EU",
|
|
162
|
+
timeFormat: "24h",
|
|
163
|
+
firstDayOfWeek: 0
|
|
164
|
+
},
|
|
165
|
+
"id-ID": {
|
|
166
|
+
locale: "id-ID",
|
|
167
|
+
language: "Indonesian",
|
|
168
|
+
region: "Indonesia",
|
|
169
|
+
dateFormat: "EU",
|
|
170
|
+
timeFormat: "24h",
|
|
171
|
+
firstDayOfWeek: 0
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
var DATE_FORMAT_REGISTRY = {
|
|
175
|
+
ISO: {
|
|
176
|
+
type: "ISO",
|
|
177
|
+
pattern: "yyyy-MM-dd'T'HH:mm:ss.SSSxxx",
|
|
178
|
+
description: "ISO 8601 full datetime with offset",
|
|
179
|
+
example: "2026-05-26T14:30:00.000+05:30"
|
|
180
|
+
},
|
|
181
|
+
UTC: {
|
|
182
|
+
type: "UTC",
|
|
183
|
+
pattern: "yyyy-MM-dd'T'HH:mm:ss'Z'",
|
|
184
|
+
description: "UTC datetime in ISO format",
|
|
185
|
+
example: "2026-05-26T09:00:00Z"
|
|
186
|
+
},
|
|
187
|
+
LOCAL: {
|
|
188
|
+
type: "LOCAL",
|
|
189
|
+
pattern: "Pp",
|
|
190
|
+
description: "Locale-aware short date and time",
|
|
191
|
+
example: "5/26/2026, 2:30 PM"
|
|
192
|
+
},
|
|
193
|
+
SHORT: {
|
|
194
|
+
type: "SHORT",
|
|
195
|
+
pattern: "P",
|
|
196
|
+
description: "Short date format",
|
|
197
|
+
example: "5/26/2026"
|
|
198
|
+
},
|
|
199
|
+
LONG: {
|
|
200
|
+
type: "LONG",
|
|
201
|
+
pattern: "PPP",
|
|
202
|
+
description: "Long date format with month name",
|
|
203
|
+
example: "May 26, 2026"
|
|
204
|
+
},
|
|
205
|
+
FULL: {
|
|
206
|
+
type: "FULL",
|
|
207
|
+
pattern: "PPPP",
|
|
208
|
+
description: "Full date with weekday",
|
|
209
|
+
example: "Tuesday, May 26, 2026"
|
|
210
|
+
},
|
|
211
|
+
DATETIME: {
|
|
212
|
+
type: "DATETIME",
|
|
213
|
+
pattern: "Pp",
|
|
214
|
+
description: "Combined date and time",
|
|
215
|
+
example: "5/26/2026, 2:30 PM"
|
|
216
|
+
},
|
|
217
|
+
TIME_ONLY: {
|
|
218
|
+
type: "TIME_ONLY",
|
|
219
|
+
pattern: "p",
|
|
220
|
+
description: "Time only",
|
|
221
|
+
example: "2:30 PM"
|
|
222
|
+
},
|
|
223
|
+
DATE_ONLY: {
|
|
224
|
+
type: "DATE_ONLY",
|
|
225
|
+
pattern: "P",
|
|
226
|
+
description: "Date only",
|
|
227
|
+
example: "5/26/2026"
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
var REGIONAL_DATE_PATTERNS = {
|
|
231
|
+
IN: "dd/MM/yyyy",
|
|
232
|
+
US: "MM/dd/yyyy",
|
|
233
|
+
EU: "dd.MM.yyyy",
|
|
234
|
+
UK: "dd/MM/yyyy",
|
|
235
|
+
JP: "yyyy/MM/dd",
|
|
236
|
+
AR: "dd/MM/yyyy",
|
|
237
|
+
CN: "yyyy/MM/dd",
|
|
238
|
+
ISO: "yyyy-MM-dd"
|
|
239
|
+
};
|
|
240
|
+
function getLocaleMetadata(locale) {
|
|
241
|
+
return LOCALE_METADATA[locale];
|
|
242
|
+
}
|
|
243
|
+
function getDateFormatEntry(type) {
|
|
244
|
+
return DATE_FORMAT_REGISTRY[type];
|
|
245
|
+
}
|
|
246
|
+
function getRegionalPattern(format) {
|
|
247
|
+
return REGIONAL_DATE_PATTERNS[format];
|
|
248
|
+
}
|
|
249
|
+
function listLocales() {
|
|
250
|
+
return Object.values(LOCALE_METADATA);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
exports.DATE_FORMAT_REGISTRY = DATE_FORMAT_REGISTRY;
|
|
254
|
+
exports.LOCALE_METADATA = LOCALE_METADATA;
|
|
255
|
+
exports.REGIONAL_DATE_PATTERNS = REGIONAL_DATE_PATTERNS;
|
|
256
|
+
exports.getDateFormatEntry = getDateFormatEntry;
|
|
257
|
+
exports.getLocaleMetadata = getLocaleMetadata;
|
|
258
|
+
exports.getRegionalPattern = getRegionalPattern;
|
|
259
|
+
exports.listLocales = listLocales;
|
|
260
|
+
//# sourceMappingURL=chunk-SGH7TEFO.cjs.map
|
|
261
|
+
//# sourceMappingURL=chunk-SGH7TEFO.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/locales.ts"],"names":[],"mappings":";;;AAOO,IAAM,eAAA,GAAkD;AAAA,EAC7D,OAAA,EAAS;AAAA,IACP,MAAA,EAAQ,OAAA;AAAA,IACR,QAAA,EAAU,SAAA;AAAA,IACV,MAAA,EAAQ,eAAA;AAAA,IACR,UAAA,EAAY,IAAA;AAAA,IACZ,UAAA,EAAY,KAAA;AAAA,IACZ,cAAA,EAAgB;AAAA,GAClB;AAAA,EACA,OAAA,EAAS;AAAA,IACP,MAAA,EAAQ,OAAA;AAAA,IACR,QAAA,EAAU,SAAA;AAAA,IACV,MAAA,EAAQ,gBAAA;AAAA,IACR,UAAA,EAAY,IAAA;AAAA,IACZ,UAAA,EAAY,KAAA;AAAA,IACZ,cAAA,EAAgB;AAAA,GAClB;AAAA,EACA,OAAA,EAAS;AAAA,IACP,MAAA,EAAQ,OAAA;AAAA,IACR,QAAA,EAAU,SAAA;AAAA,IACV,MAAA,EAAQ,OAAA;AAAA,IACR,UAAA,EAAY,IAAA;AAAA,IACZ,UAAA,EAAY,KAAA;AAAA,IACZ,cAAA,EAAgB;AAAA,GAClB;AAAA,EACA,OAAA,EAAS;AAAA,IACP,MAAA,EAAQ,OAAA;AAAA,IACR,QAAA,EAAU,UAAA;AAAA,IACV,MAAA,EAAQ,OAAA;AAAA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AAAA,IACb,OAAA,EAAS;AAAA;AAEb;AAGO,IAAM,sBAAA,GAA6D;AAAA,EACxE,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,GAAA,EAAK;AACP;AAEO,SAAS,kBAAkB,MAAA,EAA4C;AAC5E,EAAA,OAAO,gBAAgB,MAAM,CAAA;AAC/B;AAEO,SAAS,mBAAmB,IAAA,EAAmD;AACpF,EAAA,OAAO,qBAAqB,IAAI,CAAA;AAClC;AAEO,SAAS,mBAAmB,MAAA,EAAoC;AACrE,EAAA,OAAO,uBAAuB,MAAM,CAAA;AACtC;AAEO,SAAS,WAAA,GAAgC;AAC9C,EAAA,OAAO,MAAA,CAAO,OAAO,eAAe,CAAA;AACtC","file":"chunk-SGH7TEFO.cjs","sourcesContent":["import type {\n LocaleMetadata,\n DateFormatRegistryEntry,\n RegionalDateFormat,\n} from \"@multisystemsuite/timezone-engine-shared-types\";\n\n/** Hardcoded locale metadata — offline-first */\nexport const LOCALE_METADATA: Record<string, LocaleMetadata> = {\n \"en-US\": {\n locale: \"en-US\",\n language: \"English\",\n region: \"United States\",\n dateFormat: \"US\",\n timeFormat: \"12h\",\n firstDayOfWeek: 0,\n },\n \"en-GB\": {\n locale: \"en-GB\",\n language: \"English\",\n region: \"United Kingdom\",\n dateFormat: \"UK\",\n timeFormat: \"24h\",\n firstDayOfWeek: 1,\n },\n \"en-IN\": {\n locale: \"en-IN\",\n language: \"English\",\n region: \"India\",\n dateFormat: \"IN\",\n timeFormat: \"12h\",\n firstDayOfWeek: 0,\n },\n \"ja-JP\": {\n locale: \"ja-JP\",\n language: \"Japanese\",\n region: \"Japan\",\n dateFormat: \"JP\",\n timeFormat: \"24h\",\n firstDayOfWeek: 0,\n },\n \"fr-FR\": {\n locale: \"fr-FR\",\n language: \"French\",\n region: \"France\",\n dateFormat: \"EU\",\n timeFormat: \"24h\",\n firstDayOfWeek: 1,\n },\n \"de-DE\": {\n locale: \"de-DE\",\n language: \"German\",\n region: \"Germany\",\n dateFormat: \"EU\",\n timeFormat: \"24h\",\n firstDayOfWeek: 1,\n },\n \"ar-AE\": {\n locale: \"ar-AE\",\n language: \"Arabic\",\n region: \"UAE\",\n dateFormat: \"AR\",\n timeFormat: \"12h\",\n firstDayOfWeek: 6,\n },\n \"ar-SA\": {\n locale: \"ar-SA\",\n language: \"Arabic\",\n region: \"Saudi Arabia\",\n dateFormat: \"AR\",\n timeFormat: \"12h\",\n firstDayOfWeek: 6,\n },\n \"zh-CN\": {\n locale: \"zh-CN\",\n language: \"Chinese\",\n region: \"China\",\n dateFormat: \"CN\",\n timeFormat: \"24h\",\n firstDayOfWeek: 1,\n },\n \"zh-HK\": {\n locale: \"zh-HK\",\n language: \"Chinese\",\n region: \"Hong Kong\",\n dateFormat: \"CN\",\n timeFormat: \"12h\",\n firstDayOfWeek: 0,\n },\n \"ko-KR\": {\n locale: \"ko-KR\",\n language: \"Korean\",\n region: \"South Korea\",\n dateFormat: \"ISO\",\n timeFormat: \"12h\",\n firstDayOfWeek: 0,\n },\n \"pt-BR\": {\n locale: \"pt-BR\",\n language: \"Portuguese\",\n region: \"Brazil\",\n dateFormat: \"EU\",\n timeFormat: \"24h\",\n firstDayOfWeek: 0,\n },\n \"es-ES\": {\n locale: \"es-ES\",\n language: \"Spanish\",\n region: \"Spain\",\n dateFormat: \"EU\",\n timeFormat: \"24h\",\n firstDayOfWeek: 1,\n },\n \"it-IT\": {\n locale: \"it-IT\",\n language: \"Italian\",\n region: \"Italy\",\n dateFormat: \"EU\",\n timeFormat: \"24h\",\n firstDayOfWeek: 1,\n },\n \"nl-NL\": {\n locale: \"nl-NL\",\n language: \"Dutch\",\n region: \"Netherlands\",\n dateFormat: \"EU\",\n timeFormat: \"24h\",\n firstDayOfWeek: 1,\n },\n \"ru-RU\": {\n locale: \"ru-RU\",\n language: \"Russian\",\n region: \"Russia\",\n dateFormat: \"EU\",\n timeFormat: \"24h\",\n firstDayOfWeek: 1,\n },\n \"en-AU\": {\n locale: \"en-AU\",\n language: \"English\",\n region: \"Australia\",\n dateFormat: \"UK\",\n timeFormat: \"12h\",\n firstDayOfWeek: 1,\n },\n \"en-CA\": {\n locale: \"en-CA\",\n language: \"English\",\n region: \"Canada\",\n dateFormat: \"US\",\n timeFormat: \"12h\",\n firstDayOfWeek: 0,\n },\n \"en-SG\": {\n locale: \"en-SG\",\n language: \"English\",\n region: \"Singapore\",\n dateFormat: \"UK\",\n timeFormat: \"12h\",\n firstDayOfWeek: 0,\n },\n \"th-TH\": {\n locale: \"th-TH\",\n language: \"Thai\",\n region: \"Thailand\",\n dateFormat: \"EU\",\n timeFormat: \"24h\",\n firstDayOfWeek: 0,\n },\n \"id-ID\": {\n locale: \"id-ID\",\n language: \"Indonesian\",\n region: \"Indonesia\",\n dateFormat: \"EU\",\n timeFormat: \"24h\",\n firstDayOfWeek: 0,\n },\n};\n\n/** Hardcoded date format registry */\nexport const DATE_FORMAT_REGISTRY: Record<string, DateFormatRegistryEntry> = {\n ISO: {\n type: \"ISO\",\n pattern: \"yyyy-MM-dd'T'HH:mm:ss.SSSxxx\",\n description: \"ISO 8601 full datetime with offset\",\n example: \"2026-05-26T14:30:00.000+05:30\",\n },\n UTC: {\n type: \"UTC\",\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\",\n description: \"UTC datetime in ISO format\",\n example: \"2026-05-26T09:00:00Z\",\n },\n LOCAL: {\n type: \"LOCAL\",\n pattern: \"Pp\",\n description: \"Locale-aware short date and time\",\n example: \"5/26/2026, 2:30 PM\",\n },\n SHORT: {\n type: \"SHORT\",\n pattern: \"P\",\n description: \"Short date format\",\n example: \"5/26/2026\",\n },\n LONG: {\n type: \"LONG\",\n pattern: \"PPP\",\n description: \"Long date format with month name\",\n example: \"May 26, 2026\",\n },\n FULL: {\n type: \"FULL\",\n pattern: \"PPPP\",\n description: \"Full date with weekday\",\n example: \"Tuesday, May 26, 2026\",\n },\n DATETIME: {\n type: \"DATETIME\",\n pattern: \"Pp\",\n description: \"Combined date and time\",\n example: \"5/26/2026, 2:30 PM\",\n },\n TIME_ONLY: {\n type: \"TIME_ONLY\",\n pattern: \"p\",\n description: \"Time only\",\n example: \"2:30 PM\",\n },\n DATE_ONLY: {\n type: \"DATE_ONLY\",\n pattern: \"P\",\n description: \"Date only\",\n example: \"5/26/2026\",\n },\n};\n\n/** Regional date format patterns */\nexport const REGIONAL_DATE_PATTERNS: Record<RegionalDateFormat, string> = {\n IN: \"dd/MM/yyyy\",\n US: \"MM/dd/yyyy\",\n EU: \"dd.MM.yyyy\",\n UK: \"dd/MM/yyyy\",\n JP: \"yyyy/MM/dd\",\n AR: \"dd/MM/yyyy\",\n CN: \"yyyy/MM/dd\",\n ISO: \"yyyy-MM-dd\",\n};\n\nexport function getLocaleMetadata(locale: string): LocaleMetadata | undefined {\n return LOCALE_METADATA[locale];\n}\n\nexport function getDateFormatEntry(type: string): DateFormatRegistryEntry | undefined {\n return DATE_FORMAT_REGISTRY[type];\n}\n\nexport function getRegionalPattern(format: RegionalDateFormat): string {\n return REGIONAL_DATE_PATTERNS[format];\n}\n\nexport function listLocales(): LocaleMetadata[] {\n return Object.values(LOCALE_METADATA);\n}\n"]}
|