mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-04-20 23:23:56 +03:00
expose delay in routes, bugfix 🐛
This commit is contained in:
parent
5d05be8aa8
commit
201a5c51e1
1 changed files with 3 additions and 1 deletions
4
parse.js
4
parse.js
|
@ -79,8 +79,10 @@ const part = (tz, s, p, r, c) => (pt) => {
|
|||
from: s[parseInt(pt.dep.locX)]
|
||||
, to: s[parseInt(pt.arr.locX)]
|
||||
, start: new Date(dateTime(tz, c.date, pt.dep.dTimeR || pt.dep.dTimeS))
|
||||
, end: new Date(dateTime(tz, c.date, pt.dep.aTimeR || pt.arr.aTimeS))
|
||||
, end: new Date(dateTime(tz, c.date, pt.arr.aTimeR || pt.arr.aTimeS))
|
||||
}
|
||||
if (pt.dep.dTimeR && pt.dep.dTimeS) result.delay =
|
||||
dateTime(c.date, pt.dep.dTimeR) - dateTime(c.date, pt.dep.dTimeS)
|
||||
if (pt.type === 'WALK') result.type = 'walking'
|
||||
else if (pt.type === 'JNY') {
|
||||
result.product = p[parseInt(pt.jny.prodX)]
|
||||
|
|
Loading…
Add table
Reference in a new issue