wsp-ms-core 1.1.19 → 1.1.21
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/index.cjs +16 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -275,6 +275,7 @@ declare class Country extends ValueObject<string> {
|
|
|
275
275
|
uuid(): string;
|
|
276
276
|
phoneCode(): string;
|
|
277
277
|
url(): string;
|
|
278
|
+
getTimezone(): string;
|
|
278
279
|
static findCountryByAlpha2(alpha2: string): Country;
|
|
279
280
|
static findCountryByUUID(uuid: string): Country;
|
|
280
281
|
static create(country: string): Country;
|
package/dist/index.d.ts
CHANGED
|
@@ -275,6 +275,7 @@ declare class Country extends ValueObject<string> {
|
|
|
275
275
|
uuid(): string;
|
|
276
276
|
phoneCode(): string;
|
|
277
277
|
url(): string;
|
|
278
|
+
getTimezone(): string;
|
|
278
279
|
static findCountryByAlpha2(alpha2: string): Country;
|
|
279
280
|
static findCountryByUUID(uuid: string): Country;
|
|
280
281
|
static create(country: string): Country;
|
package/dist/index.js
CHANGED
|
@@ -711,6 +711,22 @@ var _Country = class _Country extends ValueObject {
|
|
|
711
711
|
url() {
|
|
712
712
|
return this._url;
|
|
713
713
|
}
|
|
714
|
+
getTimezone() {
|
|
715
|
+
const timezones = {
|
|
716
|
+
"URUGUAY": "America/Montevideo",
|
|
717
|
+
"ARGENTINA": "America/Argentina/Buenos_Aires",
|
|
718
|
+
"CHILE": "America/Santiago",
|
|
719
|
+
"BRASIL": "America/Sao_Paulo",
|
|
720
|
+
"COLOMBIA": "America/Bogota",
|
|
721
|
+
"PERU": "America/Lima",
|
|
722
|
+
"ECUADOR": "America/Guayaquil",
|
|
723
|
+
"PARAGUAY": "America/Asuncion",
|
|
724
|
+
"BOLIVIA": "America/La_Paz",
|
|
725
|
+
"VENEZUELA": "America/Caracas",
|
|
726
|
+
"USA": "America/New_York"
|
|
727
|
+
};
|
|
728
|
+
return timezones[this.value] || "utc";
|
|
729
|
+
}
|
|
714
730
|
static findCountryByAlpha2(alpha2) {
|
|
715
731
|
for (const [country, codes] of Object.entries(_Country.COUNTRIES)) {
|
|
716
732
|
if (codes.alpha2 === alpha2.toUpperCase()) {
|