diff --git a/parse/arrival-or-departure.js b/parse/arrival-or-departure.js index b45c0cc8..10b192a1 100644 --- a/parse/arrival-or-departure.js +++ b/parse/arrival-or-departure.js @@ -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) { diff --git a/parse/journey-leg.js b/parse/journey-leg.js index 45f59f78..dc46c44f 100644 --- a/parse/journey-leg.js +++ b/parse/journey-leg.js @@ -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 } } diff --git a/parse/stopover.js b/parse/stopover.js index c1e8a7c2..9887ca07 100644 --- a/parse/stopover.js +++ b/parse/stopover.js @@ -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 } } }