sveltekit-ui 1.0.78 → 1.0.80

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.
@@ -245,12 +245,16 @@ export function get_time_full_from_object(val_loc) {
245
245
  hour: null,
246
246
  minute: null,
247
247
  second: null,
248
- timezone: val_loc?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
248
+ timezone:
249
+ val_loc?.timezone && common_timezones.some((h) => h?.text == val_loc?.timezone)
250
+ ? val_loc?.timezone
251
+ : Intl.DateTimeFormat().resolvedOptions().timeZone,
249
252
  datetime: null,
250
253
  datetime_zoned: null,
251
254
  datetime_utc: null,
252
255
  content: null,
253
256
  }
257
+ console.log("time_full", { val_loc, time_full })
254
258
  if (val_loc?.is_null) {
255
259
  return time_full
256
260
  }
@@ -310,6 +314,7 @@ export function get_time_full_from_object(val_loc) {
310
314
  return time_full
311
315
  }
312
316
  time_full.epoch = Math.floor(date.getTime() / 1000)
317
+ console.log("time_full2", time_full?.timezone)
313
318
  let date_formatter = new Intl.DateTimeFormat("en-US", {
314
319
  year: "numeric",
315
320
  month: "numeric",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sveltekit-ui",
3
- "version": "1.0.78",
3
+ "version": "1.0.80",
4
4
  "description": "A SvelteKit UI component library for building modern web applications",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -245,12 +245,16 @@ export function get_time_full_from_object(val_loc) {
245
245
  hour: null,
246
246
  minute: null,
247
247
  second: null,
248
- timezone: val_loc?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
248
+ timezone:
249
+ val_loc?.timezone && common_timezones.some((h) => h?.text == val_loc?.timezone)
250
+ ? val_loc?.timezone
251
+ : Intl.DateTimeFormat().resolvedOptions().timeZone,
249
252
  datetime: null,
250
253
  datetime_zoned: null,
251
254
  datetime_utc: null,
252
255
  content: null,
253
256
  }
257
+ console.log("time_full", { val_loc, time_full })
254
258
  if (val_loc?.is_null) {
255
259
  return time_full
256
260
  }
@@ -310,6 +314,7 @@ export function get_time_full_from_object(val_loc) {
310
314
  return time_full
311
315
  }
312
316
  time_full.epoch = Math.floor(date.getTime() / 1000)
317
+ console.log("time_full2", time_full?.timezone)
313
318
  let date_formatter = new Intl.DateTimeFormat("en-US", {
314
319
  year: "numeric",
315
320
  month: "numeric",