SEV-378: add tolerant formatDate/formatDateTime to shared (v0.3.0)
Our Go/Turso layer emits SQLite datetime('now') as "YYYY-MM-DD HH:MM:SS"
(UTC, no zone), which new Date() can't parse → "Invalid Date" in admin.
formatDate/formatDateTime normalize that shape (space→T + Z) and RFC3339,
returning '' for falsy/invalid. Tests cover both formats + empties.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@switchev/web-shared",
|
||||
"version": "0.2.0",
|
||||
"version": "0.3.0",
|
||||
"description": "Shared browser helpers (formatters, markdown, image polling) for the SwitchEV frontends",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
|
||||
Reference in New Issue
Block a user