@mcurros2/microm 1.1.139-0 → 1.1.140-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/index.d.ts.map +1 -1
- package/dist/index.js +7 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6310,17 +6310,13 @@ function $571203341efec15f$export$f5dd818bff069720(value, locale) {
|
|
|
6310
6310
|
return new Intl.NumberFormat(locale).format(Number(value));
|
|
6311
6311
|
}
|
|
6312
6312
|
function $571203341efec15f$export$5dd6539d90141996(value) {
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
const formattedOffset = `${sign}${hours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}`;
|
|
6321
|
-
if (formattedOffset) return new Date(`${isoString}${formattedOffset}`);
|
|
6322
|
-
}
|
|
6323
|
-
return new Date(value);
|
|
6313
|
+
// If the value already includes an explicit timezone indicator, parse as is.
|
|
6314
|
+
if (value.endsWith("Z") || value.includes("GMT") || value.includes("GMT+") || value.includes("GMT-")) return new Date(value);
|
|
6315
|
+
// Otherwise, assume the date string is in local time.
|
|
6316
|
+
// Convert local date to UTC by adding the timezone offset.
|
|
6317
|
+
const localDate = new Date(value);
|
|
6318
|
+
const utcTime = localDate.getTime() + localDate.getTimezoneOffset() * 60000;
|
|
6319
|
+
return new Date(utcTime);
|
|
6324
6320
|
}
|
|
6325
6321
|
function $571203341efec15f$export$62c5cbf81b90da20(value, sqlType, locale) {
|
|
6326
6322
|
if (value === null) return "null";
|