Bank holidays are defined by name, eg. ChristmasDay. Some such as ChristmasDay always represent the same date and others such as SpringBank and EasterMonday are on different dates annually.
There are also displacement (aka substitute) holidays such as ChristmasDayHoliday
and NewYearsDayHoliday
which represent the extra day off that occurs when a calendared bank holiday falls on a weekend.
Finally, the OtherPublicHoliday
elements allows additional non-standard holidays to be defined that do not have a named element.
<BankHolidayOperation>
<DaysOfOperation>
<BoxingDay />
<ChristmasEve />
<NewYearsEve />
</DaysOfOperation>
<DaysOfNonOperation>
<ChristmasDay />
<NewYearsDay />
<OtherPublicHoliday>
<Description>Platinum Jubilee Extra Bank Holiday</Description>
<Date>2022-06-03</Date>
</OtherPublicHoliday>
</DaysOfNonOperation>
</BankHolidayOperation>
A common issue occurs when a service is shown to run on a displacement holiday date, when it is not intended to.
This is caused by the wrong bank holiday name being used, such as ChristmasDay
where ChristmasDayHoliday
was intended.
You can read more about displacement holidays in TransXChange in this blog:https://passenger.tech/news/the-best-data-is-simple-data/
Please note that in 2023, both Christmas Day and Boxing Day fall on regular days of the week and therefore do not require ChristmasDayHoliday or BoxingDayHoliday (the displacement holiday dates) to be used.
Bank Holiday Groups
Although there are also bank holiday group elements such as AllBankHolidays
, and these are supported by Passenger, the TXC-PTI profile does not recommend using them.
Passenger also recommends using the more specific bank holiday elements where possible.
<BankHolidayOperation>
<DaysOfNonOperation>
<AllBankHolidays/>
</DaysOfNonOperation>
</BankHolidayOperation>
Continue to the next article on Managing Journey Data: Timetable sorting.