Wirebook › Bonus lesson
Where did my day off go?
In 2027, Christmas Day is a Saturday and Boxing Day is a Sunday. Do people lose their days off? Usually not: the rules hand out replacement weekdays. But a calendar that follows the rules carelessly can quietly lose a day. Become a holiday detective, rescue the missing day-off tickets, and find out how your phone's calendar knows any of this.
Why a day can vanish
A simple rule like "if a holiday is on a weekend, use the next Monday" works for one holiday. Give it two holidays in a row and both land on the same Monday. The calendar shows one day off, a worker gets one day off, and the second holiday is silently gone. That's exactly the trap in the double-weekend puzzle: the real rule is "the next weekday that isn't already taken", and the holidays take their turn in order.
| Place | What happens to a weekend holiday | Christmas 2027 (Sat) and Boxing Day (Sun) |
|---|---|---|
| England, Wales, Scotland, Northern Ireland | A substitute weekday is given instead | Monday 27 and Tuesday 28 December |
| New Zealand | "Mondayised": the day off moves to the next free weekday | Monday 27 and Tuesday 28 December |
| New South Wales and most of Australia | The weekend date stays a holiday and an additional weekday is added | Saturday 25 and Sunday 26 stay, plus Monday 27 and Tuesday 28 |
So how does your phone's calendar know?
- Someone publishes the list. Governments announce holidays, sometimes years ahead and sometimes at short notice (a royal wedding, a funeral, a sports win). The UK government publishes its bank holidays on GOV.UK as a web page, a data file and a calendar file.
- The calendar app downloads it. A holiday calendar is usually a calendar feed: a small text file in a format called iCalendar (ending in
.ics) that lives at a web address. Your phone asks for it again every so often, so new or moved holidays appear without you doing anything. - Rules are only a starting point. Code can work out Easter or "first Monday in May", but substitute days, one-off holidays and local differences come from the published lists. Good apps follow the rule, then check the list.
- Every event keeps its own name tag. Each holiday in a feed is a separate event with its own date and name, so two holidays on the same day are simply two events, and a substitute day can say which holiday it replaces.
- A red day is not automatically a day off. Calendar apps often paint observances, school closures and paid statutory holidays the same colour. The feed (or a note on the event) has to say which kind it is, and you still check with your school or workplace when the ticket says maybe.
Grown-up twins: Tooltern's bank holiday calculator lists every holiday (with substitutes) for the UK, Ireland, the US, Canada, Australia, New Zealand and more, and explains Ontario's nine paid holidays, why Civic Holiday is not a statutory day in Ontario and Australian additional days. Developers can subscribe to the same lists as a calendar feed from Anvil's holidays API. Related lessons: how two people edit one picture, where a game keeps your progress.