mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 18:34:02 +00:00
The observed-history transport is RailTimeline in src/ui/rail/, rendered by createRailTimeline() with the same update and destroy API. Drag preview, the coalesced 150 ms commit, release, cancel and blur behave as before; the slider keeps the ticks it is dragged over, an update from inside a preview cannot move the handle back, and readouts follow the handle within the same task. utcClock moves to its own module and is still exported here.
10 lines
347 B
JavaScript
10 lines
347 B
JavaScript
/**
|
|
* "HH:MM UTC" of a time, or '' when it is not one. Computed on its own rather
|
|
* than cut from the dated readout: the localized day and month vary in length
|
|
* ("3/9" in Spanish, "09-03" in English).
|
|
*/
|
|
export const utcClock = (tick) =>
|
|
Number.isFinite(Date.parse(tick))
|
|
? `${new Date(tick).toISOString().slice(11, 16)} UTC`
|
|
: '';
|