Bridge-Day Leave Optimizer
Place your leave days around public holidays for the most days off in a row.
Try an example: Bavaria 2027, 10 leave days · Netherlands, spring 2027, 5 days in at most two breaks · United States 2027, 8 days
How it works
Takes your number of leave days, the public holidays of your country and region and your weekend, and finds the leave days that give the most days off in breaks — computed exactly, not by trial and error — plus a list of the best bridge days around each holiday.
- Days off are weekends (your weekend days), public holidays of the country (Nager.Date entries of type “Public”, nationwide plus your region) and extra closing days. Every other day is a working day that costs one leave day.
- A break is a run of days off that contains at least one leave day; it counts with its full length, weekends and holidays included, and only when it is at least the shortest break you want.
- The optimiser is an exact dynamic programme over the working days: taking working days k…e always opens the run from the day after the previous working day to the day before the next one, so the best plan is a set of non-adjacent ranges of working days. It maximises the days off in breaks; on a tie it uses fewer leave days, then the earlier plan. A test compares it with a brute-force search over every subset of working days.
- Bridge-day ideas list short breaks (1–4 leave days) that contain a public holiday, ranked by days off per leave day, without overlaps.
Check your contract, collective agreement and employer rules: some regions have extra local holidays, half days or company closures that are not in the data.
Sources
Part of Hearth
-
Hearth Home & travel planner
Plan meals, chores, home care, moves, trips and good days for your household in one place.
How to use the Bridge-Day Leave Optimizer
Place your leave days around public holidays for the most days off in a row, understand the plan, and steer it towards fewer, longer breaks.
What it is for
A Thursday holiday plus one leave day on Friday gives you four days off. Finding every such chance in a year — for your country, your region and your own weekend — is tedious by hand. This tool takes your number of leave days and computes exactly which days to take so that the breaks add up to the most days off.
It counts weekends, public holidays (Nager.Date data for 16 countries, 2024–2030, nationwide plus your state or region) and any extra closing days you enter. It cannot know your employer's rules, half days or local holidays that are not public holidays.
Worked example
Bavaria 2027 with ten leave days. Inputs: country Germany, region DE-BY, period 2027-01-01 to 2027-12-31, 10 leave days, shortest break 4 days. The answer: "10 leave days give 34 days off in 8 breaks (3.4 days off per leave day)."
| From | To | Days off | Take leave on | Holidays |
|---|---|---|---|---|
| 2027-01-01 | 2027-01-04 | 4 | 2027-01-04 | New Year's Day |
| 2027-01-06 | 2027-01-10 | 5 | 2027-01-07, 2027-01-08 | Epiphany |
| 2027-03-25 | 2027-03-29 | 5 | 2027-03-25 | Good Friday, Easter Monday |
| 2027-05-06 | 2027-05-09 | 4 | 2027-05-07 | Ascension Day |
| 2027-05-14 | 2027-05-17 | 4 | 2027-05-14 | Whit Monday |
| 2027-05-27 | 2027-05-30 | 4 | 2027-05-28 | Corpus Christi |
| 2027-10-29 | 2027-11-01 | 4 | 2027-10-29 | All Saints' Day |
One more break, 14–17 January, uses the last two days. Taking Maundy Thursday, 25 March, turns Easter into five days off for one leave day; Ascension Day on a Thursday needs only the Friday after it.
How to read the result
- Days off in breaks is the total length of all breaks, weekends and holidays included.
- Days off per leave day shows how hard your leave works; above 3 is very good.
- Planned breaks lists each break with the exact leave dates. A break counts only if it is at least the shortest break you set.
- Best bridge days is a separate list of short breaks (1–4 leave days) around a public holiday, ranked by days off per leave day — useful if you only want a few long weekends.
- Breaks that touch the start or end of the period may continue outside it; check the days before and after.
Tips and common mistakes
- Enter your region: German, Swiss, Austrian, Spanish and other regional holidays only count with a code such as
DE-BYorCH-ZH. - The tool maximises the total days off, which favours many long weekends. If you want one real holiday, set Most separate breaks to 1 or 2 and raise the shortest break.
- Add company closing days (for example 24 and 31 December) — they cost no leave and can link breaks.
- Keep some leave unplanned: set fewer leave days than you have.
- Holidays exist in the data up to 2030; later dates count only weekends.
FAQ
Is this the best possible plan, or a good guess?
The best possible one for the rules you set. The tool solves the problem exactly with dynamic programming, and its test suite compares it with a brute-force search over every combination of working days.
Why is a break without any holiday in my plan?
After the holiday bridges, leftover days still add the most days off as long weekends. Reduce the leave days or limit the number of breaks to avoid that.
Can I use a different weekend?
Yes, pick any weekend days, for example Friday and Saturday.
Where do the public holidays come from?
From Nager.Date (MIT licence), only entries of type "Public"; school and bank holidays are ignored.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://hearthleaveoptimizer.usefulweb.app/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://hearthleaveoptimizer.usefulweb.app/mcp· tool namehearth_leave_optimizer
Example request
curl -s -X POST https://hearthleaveoptimizer.usefulweb.app/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"country":"DE","subdivision":"DE-BY","from":"2027-01-01","to":"2027-12-31","leaveDays":10,"minBreak":4}'