You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a bunch of helpers in utils/date and utils/timeManipulation. Some of these are buggy, some could improved to be more type-safe, some are overlapping in functionality, and they all could be tweaked to be more consistent.
I've been working on this for a while already, this issue is about the remaining work.
Description and goal
We have a bunch of helpers in
utils/date
andutils/timeManipulation
. Some of these are buggy, some could improved to be more type-safe, some are overlapping in functionality, and they all could be tweaked to be more consistent.I've been working on this for a while already, this issue is about the remaining work.
utils/date
timestampToHHMMSS()
: can be replaced bydateToHHMMSS()
, which is more type-safe (front: improve OperationalPointWithTimeAndSpeed type safety, drop timestampToHHMMSS() #10876)formatIsoDate()
: should be replaced with something working with local datesdateTimeFormatting()
formatDay()
formatDateToString()
andextractDateAndTime()
serializeDateTimeWithoutYear()
formatDateString()
dateToHHMMSS()
dateToDDMMYYYY()
formatToIsoDate()
(front: drop formatToIsoDate() #10845)formatLocaleDateToIsoDate()
: should be dropped, replaced byDate.toISOString()
isoDateToMs()
: should be dropped (front: drop formatToIsoDate() #10845)isoDateWithTimezoneToSec()
: should be droppedformatDateForInput()
: should be replaced with something similar toformatLocalDateTime()
convertUTCDateToLocalDate()
: should be droppedgenerateISODateFromDateTime()
: needs investigation? (mutates input arg, awkward API)formatLocaleDate()
: should be dropped, buggy (front: fix isEqualDate() #10846)formatTimeDifference()
: should be moved toDuration
?utils/timeManipulation
sec2ms()
,ms2sec()
,minToMs()
,durationInSeconds()
,calculateTimeDifferenceInDays()
,secToMin()
,SECONDS_IN_A_DAY
: should be replaced byDuration
datetime2time()
,time2datetime()
,sec2datetime()
,secToHoursString()
: weird to use d3 for this, overlaps with time formatting helpers fromutils/date
? (front: drop TimeButtons, TrainDetails and ChartSynchronizer #10881)sec2time()
: uses UTC instead of local time?Acceptance criteria
.
The text was updated successfully, but these errors were encountered: