mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
parseWhen, parsePlatform: let when
& platform
fall back to plan data
This commit adapts parseWhen & parsePlatform to the latest FPTF v2 draft. see public-transport/friendly-public-transport-format#63
This commit is contained in:
parent
2d1d482ddf
commit
c2dc8742b6
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ const parsePlatform = (profile, platfS, platfR, cncl = false) => {
|
|||
}
|
||||
}
|
||||
return {
|
||||
platform: prognosed,
|
||||
platform: prognosed || planned,
|
||||
plannedPlatform: planned
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ const parseWhen = (profile, date, timeS, timeR, tzOffset, cncl = false) => {
|
|||
}
|
||||
}
|
||||
return {
|
||||
when: prognosed,
|
||||
when: prognosed || planned,
|
||||
plannedWhen: planned,
|
||||
delay
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue