@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260428110702 → 0.8.1-dev.20260428121232

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 CHANGED
@@ -1300,15 +1300,9 @@ var DateView = (props) => {
1300
1300
  const getTimeZoneAbbreviation = (timeZone) => {
1301
1301
  return timeZoneAbbreviations[timeZone] || timeZone;
1302
1302
  };
1303
- const toUtcDate = (dateString) => {
1304
- const s = dateString.trim();
1305
- const iso = s.replace(" ", "T");
1306
- const utc = iso.endsWith("Z") || iso.includes("+") ? iso : iso + "Z";
1307
- return new Date(utc);
1308
- };
1309
1303
  const getRelativeTime = (dateString) => {
1310
1304
  const now = /* @__PURE__ */ new Date();
1311
- const date = toUtcDate(dateString);
1305
+ const date = /* @__PURE__ */ new Date(dateString + "Z");
1312
1306
  const diffMs = now.getTime() - date.getTime();
1313
1307
  const diffSec = Math.floor(diffMs / 1e3);
1314
1308
  const diffMin = Math.floor(diffSec / 60);
@@ -1325,8 +1319,9 @@ var DateView = (props) => {
1325
1319
  timeZone: userTimeZone
1326
1320
  }).format(date);
1327
1321
  };
1322
+ console.log("DateView props:", props);
1328
1323
  const parseAndFormatDate = (dateString, format) => {
1329
- const parsedDate = toUtcDate(dateString);
1324
+ const parsedDate = /* @__PURE__ */ new Date(dateString + "Z");
1330
1325
  if (format === "relative") {
1331
1326
  return getRelativeTime(dateString);
1332
1327
  }
package/dist/index.mjs CHANGED
@@ -168,15 +168,9 @@ var DateView = (props) => {
168
168
  const getTimeZoneAbbreviation = (timeZone) => {
169
169
  return timeZoneAbbreviations[timeZone] || timeZone;
170
170
  };
171
- const toUtcDate = (dateString) => {
172
- const s = dateString.trim();
173
- const iso = s.replace(" ", "T");
174
- const utc = iso.endsWith("Z") || iso.includes("+") ? iso : iso + "Z";
175
- return new Date(utc);
176
- };
177
171
  const getRelativeTime = (dateString) => {
178
172
  const now = /* @__PURE__ */ new Date();
179
- const date = toUtcDate(dateString);
173
+ const date = /* @__PURE__ */ new Date(dateString + "Z");
180
174
  const diffMs = now.getTime() - date.getTime();
181
175
  const diffSec = Math.floor(diffMs / 1e3);
182
176
  const diffMin = Math.floor(diffSec / 60);
@@ -193,8 +187,9 @@ var DateView = (props) => {
193
187
  timeZone: userTimeZone
194
188
  }).format(date);
195
189
  };
190
+ console.log("DateView props:", props);
196
191
  const parseAndFormatDate = (dateString, format) => {
197
- const parsedDate = toUtcDate(dateString);
192
+ const parsedDate = /* @__PURE__ */ new Date(dateString + "Z");
198
193
  if (format === "relative") {
199
194
  return getRelativeTime(dateString);
200
195
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acoustte-digital-services/digitalstore-controls-dev",
3
- "version": "0.8.1-dev.20260428110702",
3
+ "version": "0.8.1-dev.20260428121232",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",