Public Access
refactor: item 29 cleanup
F16 F17 F18 F19 F20 F21: import polling backs off and pauses in a hidden tab, one date format module, fake timers in the import tests, error codes instead of raw messages, one safe storage wrapper, dead code.
This commit is contained in:
1 parent
aa5832225d
commit
89d0b29698
31 files changed
+238
-81
No files matched your search
@@ -0,0 +1,8 @@
|
||||
// A LocalDate from Core ("2026-09-27"), by default as a short day; noon, so no time zone moves it to the day before.
|
||||
export const formatDay = (day, locale, options = {day: 'numeric', month: 'short'}) =>
|
||||
new Date(`${day}T12:00:00`).toLocaleDateString(locale, options);
|
||||
|
||||
// An instant from the backend (ISO string or epoch millis) as a date, or as date and time.
|
||||
export const formatDate = (instant, locale, options) => new Date(instant).toLocaleDateString(locale, options);
|
||||
|
||||
export const formatDateTime = (instant, locale, options) => new Date(instant).toLocaleString(locale, options);
|
||||
Reference in new issue
Block a user