Shift origin weekdays to each station call

Operating weekdays on a train card refer to the origin departure. Journey Day 2 is one calendar day later. Thus 02201’s Monday, Wednesday and Friday origin departures reach Bhubaneswar on Tuesday, Thursday and Saturday.
StationWeekday = shift(OriginDepartureWeekday, StationJourneyDay-1)
# Wrap Sunday + 1 day to Monday.
# Use arrivalDay for arrival weekdays; departureDay for departure weekdays.02286 leaves New Delhi on Monday and Friday, then calls at Bhopal at 00:01 on Tuesday and Saturday. The original station card agrees. Return 02285 originates Thursday and Sunday; its Day 2 Bhopal calls fall Friday and Monday. Displaying weekday lists Monday-to-Sunday can hide that origin-to-call relationship unless you compute the offset.
For 12270’s Bhopal midnight stop, arrivals are Tuesday/Saturday at 23:59 and departures are Wednesday/Sunday at 00:04. The station card’s W/Su labels align with departure there. State which event the weekdays describe before testing consistency or planning a connection.
Try it yourself
What is Sunday plus one day?
Show explained answer
Monday; weekday arithmetic wraps around the seven-day cycle.
Try it yourself
If a train leaves Monday and a station call is Day 3, which weekday is it?
Show explained answer
Wednesday, two days after the origin departure.
Try it yourself
Why can arrival and departure weekdays differ at one station?
Show explained answer
A stop may straddle midnight, as 23:59 to 00:04 does.
