mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
formerScheduled… -> scheduled… 💥
This commit is contained in:
parent
16461733e4
commit
7e39a2f333
3 changed files with 8 additions and 8 deletions
|
@ -41,7 +41,7 @@ const createParseArrOrDep = (profile, opt, data, prefix) => {
|
|||
const pR = d.stbStop[prefix + 'PlatfR']
|
||||
const pP = d.stbStop[prefix + 'PlatfS']
|
||||
res.platform = pR || pP || null
|
||||
if (pR && pP && pR !== pP) res.formerScheduledPlatform = pP
|
||||
if (pR && pP && pR !== pP) res.scheduledPlatform = pP
|
||||
|
||||
// todo: DRY with parseStopover
|
||||
// todo: DRY with parseJourneyLeg
|
||||
|
@ -49,7 +49,7 @@ const createParseArrOrDep = (profile, opt, data, prefix) => {
|
|||
res.cancelled = true
|
||||
Object.defineProperty(res, 'canceled', {value: true})
|
||||
res.when = res.delay = null
|
||||
res.formerScheduledWhen = profile.parseDateTime(profile, d.date, tP, tz)
|
||||
res.scheduledWhen = profile.parseDateTime(profile, d.date, tP, tz)
|
||||
}
|
||||
|
||||
if (opt.remarks) {
|
||||
|
|
|
@ -162,12 +162,12 @@ const createParseJourneyLeg = (profile, opt, data) => {
|
|||
if (pt.arr.aCncl) {
|
||||
res.arrival = res.arrivalPlatform = res.arrivalDelay = null
|
||||
const arr = profile.parseDateTime(profile, j.date, pt.arr.aTimeS, pt.arr.aTZOffset)
|
||||
res.formerScheduledArrival = arr
|
||||
res.scheduledArrival = arr
|
||||
}
|
||||
if (pt.dep.dCncl) {
|
||||
res.departure = res.departurePlatform = res.departureDelay = null
|
||||
const dep = profile.parseDateTime(profile, j.date, pt.dep.dTimeS, pt.dep.dTZOffset)
|
||||
res.formerScheduledDeparture = dep
|
||||
res.scheduledDeparture = dep
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,10 +39,10 @@ const createParseStopover = (profile, opt, data, date) => {
|
|||
}
|
||||
|
||||
if (st.aPlatfR && st.aPlatfS && st.aPlatfR !== st.aPlatfS) {
|
||||
res.formerScheduledArrivalPlatform = st.aPlatfS
|
||||
res.scheduledArrivalPlatform = st.aPlatfS
|
||||
}
|
||||
if (st.dPlatfR && st.dPlatfS && st.dPlatfR !== st.dPlatfS) {
|
||||
res.formerScheduledDeparturePlatform = st.dPlatfS
|
||||
res.scheduledDeparturePlatform = st.dPlatfS
|
||||
}
|
||||
|
||||
// mark stations the train passes without stopping
|
||||
|
@ -58,7 +58,7 @@ const createParseStopover = (profile, opt, data, date) => {
|
|||
res.arrival = res.arrivalDelay = null
|
||||
if (st.aTimeS) {
|
||||
const arr = profile.parseDateTime(profile, date, st.aTimeS, st.aTZOffset)
|
||||
res.formerScheduledArrival = arr
|
||||
res.scheduledArrival = arr
|
||||
}
|
||||
}
|
||||
if (st.dCncl) {
|
||||
|
@ -66,7 +66,7 @@ const createParseStopover = (profile, opt, data, date) => {
|
|||
res.departure = res.departureDelay = null
|
||||
if (st.dTimeS) {
|
||||
const arr = profile.parseDateTime(profile, date, st.dTimeS, st.dTZOffset)
|
||||
res.formerScheduledDeparture = arr
|
||||
res.scheduledDeparture = arr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue