@stacksjs/datetime 0.59.10 → 0.59.11
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.js +3 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -227,7 +227,8 @@ var relativeTime = function(d, timeZone) {
|
|
|
227
227
|
return new Date(`${parts2.year}-${parts2.month}-${parts2.day}T${parts2.hour}:${parts2.minute}:${parts2.second}Z`);
|
|
228
228
|
};
|
|
229
229
|
var offset = function(utcTime, tzA = "UTC", tzB = "device") {
|
|
230
|
-
|
|
230
|
+
var _a;
|
|
231
|
+
tzB = tzB === "device" ? (_a = deviceTZ()) != null ? _a : "utc" : tzB;
|
|
231
232
|
const d = date(utcTime);
|
|
232
233
|
const timeA = relativeTime(d, tzA);
|
|
233
234
|
const timeB = relativeTime(d, tzB);
|
|
@@ -441,7 +442,7 @@ var format = function(inputDateOrOptions, format2 = "long", locale = "device", g
|
|
|
441
442
|
forceOffset = offset(inputDateOrOptions, "utc", tz);
|
|
442
443
|
}
|
|
443
444
|
tz != null || (tz = deviceTZ());
|
|
444
|
-
if (tz.toLowerCase() !== "utc") {
|
|
445
|
+
if ((tz == null ? undefined : tz.toLowerCase()) !== "utc") {
|
|
445
446
|
inputDateOrOptions = removeOffset(inputDateOrOptions, offset(inputDateOrOptions, tz, "utc"));
|
|
446
447
|
}
|
|
447
448
|
if (!locale || locale === "device") {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/datetime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.59.
|
|
4
|
+
"version": "0.59.11",
|
|
5
5
|
"description": "The Stacks datetime helpers.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"prepublishOnly": "bun run build"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@formkit/tempo": "^0.0.
|
|
52
|
+
"@formkit/tempo": "^0.0.15",
|
|
53
53
|
"@stacksjs/utils": "latest"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|