fix(web): Make date-time formatting follow locale (#17899)

* fixed missing $locale parameter to .toLocaleString

* Remove unused types and functions in timeline-util

* remove unused export

* re-enable export because it is needed for tests

* format
This commit is contained in:
Andreas Tollkötter
2025-04-28 15:53:26 +02:00
committed by GitHub
parent 205260d31c
commit 85ac0512a6
6 changed files with 31 additions and 70 deletions

View File

@@ -64,7 +64,9 @@
<span>{DateTime.fromISO(device.updatedAt, { locale: $locale }).toRelativeCalendar(options)}</span>
<span class="text-xs text-gray-500 dark:text-gray-400"> - </span>
<span class="text-xs text-gray-500 dark:text-gray-400">
{DateTime.fromISO(device.updatedAt, { locale: $locale }).toLocaleString(DateTime.DATETIME_MED)}
{DateTime.fromISO(device.updatedAt, { locale: $locale }).toLocaleString(DateTime.DATETIME_MED, {
locale: $locale,
})}
</span>
</div>
</div>