Plan a leave year
plan_leave_yearPlan a whole leave year: the set of breaks that turns the person's annual leave allowance into the most days off, using every bank holiday, with the dates to book for each break and the totals. Handles any leave year start date, part-time working days, three plan styles and school holidays (parents: breaks only in school holidays; school staff: the holidays themselves). Use for "Plan my 28 days of leave for 2027, I have kids at school".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | Which leave year: current or next. Defaults to current, or next when under 90 days are left. | |
| style | No | mix: two proper holidays of 9+ days, the rest long weekends (default). longWeekends: as many 3–5 day weekends as possible. bigTrips: fewer trips of 9+ days. | mix |
| region | No | Where the person works: england-and-wales, scotland or northern-ireland for UK bank holidays (from gov.uk), or a two-letter ISO 3166-1 country code such as IE, US, DE for other countries' public holidays (from Nager.Date). Defaults to england-and-wales. | england-and-wales |
| school | No | none (default); parent: children at school, so breaks only in typical school holidays; staff: works in a school, so the school holidays are the breaks. UK only. | none |
| workdays | No | Days the person works, e.g. ["mon","tue","wed","thu"] for a four-day week. Defaults to Monday to Friday. | |
| allowance | No | Days of annual leave a year, not counting public holidays. Default 25. | |
| days_used | No | Days of this leave year's allowance already taken or booked. Default 0. | |
| leave_year_starting | No | Instead of year: the calendar year the leave year starts in, e.g. 2027 for January–December 2027 or April 2027–March 2028. | |
| leave_year_start_day | No | Day of the month the leave year starts. Default 1. | |
| leave_year_start_month | No | Month the leave year starts, 1–12 (1 = January, 4 = April). Default 1. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | ||
| style | Yes | ||
| breaks | Yes | ||
| budget | Yes | ||
| region | Yes | ||
| school | Yes | ||
| source | Yes | ||
| totals | Yes | ||
| licence | Yes | ||
| daysUsed | Yes | ||
| workdays | Yes | ||
| allowance | Yes | ||
| leaveYear | Yes | ||
| sourceUrl | Yes | ||
| regionName | Yes | ||
| assumptions | Yes | ||
| attribution | Yes | Credit to show with the dates | |
| plannedFrom | Yes | ||
| bankHolidays | Yes | ||
| schoolHolidays | Yes |