Holidays
This guide covers managing holidays for your company, including importing UK bank holidays, creating custom holidays, and understanding how holidays affect leave balances and scheduling.
Overview
What Are Holidays in Shyfts?
Holidays are dates when your company is closed or operating differently. Shyfts tracks three types:
| Type | Badge Colour | Description |
|---|---|---|
| Bank Holiday | Amber | Official UK public holidays (e.g., Christmas Day, Easter Monday) |
| Company Closure | Red | Days your company is closed (e.g., annual shutdown) |
| Custom | Blue | Any other notable date (e.g., staff training day) |
Key Benefits
- Automatic Leave Calculation - Holidays are excluded from business day counts, just like weekends
- Calendar Visibility - Holidays appear as visual markers on day and week views
- Shift Warnings - Managers receive warnings when creating shifts on holiday dates
- Copy-Week Awareness - The bulk copy tool reports holidays in the target week
Access Levels
| Role | View | Create | Import | Delete |
|---|---|---|---|---|
| System Admin | Yes | Yes | Yes | Yes |
| Company Manager | Yes | Yes | Yes | Yes |
| Staff | Yes | No | No | No |
Accessing Holiday Management
- Navigate to Settings from the sidebar
- Select the Holidays tab
- The Holiday Management panel displays all configured holidays
Viewing Holidays
The holiday list shows all holidays for the current year by default:
| Column | Description |
|---|---|
| Date | Holiday date in DD/MM/YYYY format |
| Name | Holiday name (e.g., "Christmas Day") |
| Type | Badge showing bank_holiday, company_closure, or custom |
| Actions | Delete button |
Holidays are sorted by date (earliest first).
Importing UK Bank Holidays
The fastest way to set up holidays is to import official UK bank holidays.
Steps
- Click the Import UK Bank Holidays button
- Select the year to import (current year and next year available)
- Click Import
- Shyfts fetches the official holiday list from the UK Government API
- Holidays are added with type
bank_holiday
Import Behaviour
| Scenario | Result |
|---|---|
| First import for a year | All bank holidays added |
| Re-importing same year | Duplicates are skipped (idempotent) |
| Holiday already exists with same date and name | Skipped |
UK Bank Holidays (England & Wales)
Standard holidays imported include:
| Holiday | Typical Date |
|---|---|
| New Year's Day | 1 January |
| Good Friday | Varies (March/April) |
| Easter Monday | Varies (March/April) |
| Early May Bank Holiday | First Monday in May |
| Spring Bank Holiday | Last Monday in May |
| Summer Bank Holiday | Last Monday in August |
| Christmas Day | 25 December |
| Boxing Day | 26 December |
When a bank holiday falls on a weekend, the substitute weekday is automatically included.
Auto-Seeding on Company Creation
When a new company is created, Shyfts automatically imports bank holidays for the current year and the following year. You don't need to manually import these.
Creating Custom Holidays
Steps
- In the Holiday Management panel, fill in the creation form:
- Name (required) - e.g., "Annual Staff Training Day"
- Date (required) - Select the date
- Type - Choose from: Bank Holiday, Company Closure, or Custom
- Click Add Holiday
Validation Rules
| Rule | Description |
|---|---|
| Name required | Cannot be empty |
| Date required | Must be a valid date (YYYY-MM-DD) |
| No duplicates | Same company + date + name combination cannot exist twice |
Conflict Handling
If you try to create a holiday that already exists (same date and name), you'll receive a conflict error. This prevents accidental duplicates.
Deleting Holidays
- Find the holiday in the list
- Click the Delete button (bin icon)
- Confirm the deletion
Deleting a holiday does not retroactively recalculate leave balances for past leave requests. It only affects future calculations.
Recurring Holidays
Holidays can be marked as recurring (is_recurring = true). Recurring holidays are automatically expanded for the relevant years when calculating leave balances or displaying on calendars.
Example: A company closure on 24 December marked as recurring will appear every year without needing to be re-created.
How Holidays Affect Leave Balances
Business Day Calculation
When staff request leave, the number of days deducted is calculated as business days — excluding:
- Weekends (Saturday and Sunday)
- Company holidays
Example
A staff member requests leave from Monday 23 December to Friday 27 December:
| Date | Day | Holiday? | Counted? |
|---|---|---|---|
| 23 Dec | Monday | No | Yes (1 day) |
| 24 Dec | Tuesday | Company Closure | No |
| 25 Dec | Wednesday | Christmas Day | No |
| 26 Dec | Thursday | Boxing Day | No |
| 27 Dec | Friday | No | Yes (1 day) |
Result: Only 2 days deducted from leave balance instead of 5.
Where Holiday-Aware Calculations Apply
| Feature | Holiday-Aware? |
|---|---|
| Leave balance remaining | Yes |
| Leave request day count | Yes |
| Leave approval display | Yes |
| Calendar leave dropdown | Yes |
| Reports (leave summaries) | Yes |
Holidays on the Calendar
Day View
When viewing a day that is a holiday:
- An amber badge appears in the date header showing the holiday name
- A closed day message with a building icon replaces the normal time grid
- Shift creation is discouraged (warning shown)
Week View
In the weekly calendar view:
- Holiday dates show the holiday name underneath the date
- The column has an amber tint to visually distinguish it
- Staff can quickly identify non-working days
For more details, see Calendar Overview.
Troubleshooting
Common Issues
| Issue | Cause | Solution |
|---|---|---|
| Import button shows 0 imported | All holidays already exist | This is normal — import is idempotent |
| Holiday not showing on calendar | Wrong year selected | Check the year filter matches your calendar date |
| Leave balance seems wrong | Holidays not set up for that year | Import or create holidays for the relevant year |
| Cannot delete a holiday | Insufficient permissions | Only managers and admins can delete |
Related Documentation
- Calendar Overview - How holidays appear on the calendar
- Leave Types - Leave type configuration
- Leave Balance - How staff see their balance
- Opening Hours - Company operating hours
Source Files:
src/components/holidays/HolidayManagement.tsx- Holiday management UI componentsrc/hooks/useCompanyHolidays.ts- Holiday data hooksrc/lib/utils/company-holidays.ts- Shared holiday utilitiessrc/lib/utils/bank-holidays.ts- UK Government API integrationsrc/app/api/companies/[companyId]/holidays/route.ts- Holiday CRUD APIsrc/app/api/companies/[companyId]/holidays/import-bank-holidays/route.ts- Bank holiday import API