OpenRailAssociation / OpenRailAssociation/osrd
front: clean date manipulation in TS v2
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 660
- Forks
- 87
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 269
Description
Description and goal
The date manipulation in TS v2 is quite shady for the moment. Sometimes, the date received from editoast is formatted several times, but it should be formatted only once at the end, just before displaying it.
The date in ts v2 is displayed at least in the following components:
- timetable card
- get
- output table
- driver schedule
[!NOTE]
The transformation process is weird, for example the
train.startTimeprocess is as follows 🤯:
- String ISO8601
- Dayjs obj
- String custom
DD/MM/YYYY HH:mm:ss- Date obj
- Dayjs obj
- String custom
DD/MM HH:mm:ss
Acceptance criteria
- the date is formatted only once for each workflow
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing date handling in the TS v2 timetable card, get, output table, and driver schedule components. Identify where each workflow transforms the date, then verify that formatting occurs only once at the end, just before display.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100