Skip to main content

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:

TypeBadge ColourDescription
Bank HolidayAmberOfficial UK public holidays (e.g., Christmas Day, Easter Monday)
Company ClosureRedDays your company is closed (e.g., annual shutdown)
CustomBlueAny other notable date (e.g., staff training day)

Key Benefits

  1. Automatic Leave Calculation - Holidays are excluded from business day counts, just like weekends
  2. Calendar Visibility - Holidays appear as visual markers on day and week views
  3. Shift Warnings - Managers receive warnings when creating shifts on holiday dates
  4. Copy-Week Awareness - The bulk copy tool reports holidays in the target week

Access Levels

RoleViewCreateImportDelete
System AdminYesYesYesYes
Company ManagerYesYesYesYes
StaffYesNoNoNo

Accessing Holiday Management

  1. Navigate to Settings from the sidebar
  2. Select the Holidays tab
  3. The Holiday Management panel displays all configured holidays

Viewing Holidays

The holiday list shows all holidays for the current year by default:

ColumnDescription
DateHoliday date in DD/MM/YYYY format
NameHoliday name (e.g., "Christmas Day")
TypeBadge showing bank_holiday, company_closure, or custom
ActionsDelete 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

  1. Click the Import UK Bank Holidays button
  2. Select the year to import (current year and next year available)
  3. Click Import
  4. Shyfts fetches the official holiday list from the UK Government API
  5. Holidays are added with type bank_holiday

Import Behaviour

ScenarioResult
First import for a yearAll bank holidays added
Re-importing same yearDuplicates are skipped (idempotent)
Holiday already exists with same date and nameSkipped

UK Bank Holidays (England & Wales)

Standard holidays imported include:

HolidayTypical Date
New Year's Day1 January
Good FridayVaries (March/April)
Easter MondayVaries (March/April)
Early May Bank HolidayFirst Monday in May
Spring Bank HolidayLast Monday in May
Summer Bank HolidayLast Monday in August
Christmas Day25 December
Boxing Day26 December
note

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

  1. 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
  2. Click Add Holiday

Validation Rules

RuleDescription
Name requiredCannot be empty
Date requiredMust be a valid date (YYYY-MM-DD)
No duplicatesSame 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

  1. Find the holiday in the list
  2. Click the Delete button (bin icon)
  3. Confirm the deletion
caution

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:

DateDayHoliday?Counted?
23 DecMondayNoYes (1 day)
24 DecTuesdayCompany ClosureNo
25 DecWednesdayChristmas DayNo
26 DecThursdayBoxing DayNo
27 DecFridayNoYes (1 day)

Result: Only 2 days deducted from leave balance instead of 5.

Where Holiday-Aware Calculations Apply

FeatureHoliday-Aware?
Leave balance remainingYes
Leave request day countYes
Leave approval displayYes
Calendar leave dropdownYes
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

IssueCauseSolution
Import button shows 0 importedAll holidays already existThis is normal — import is idempotent
Holiday not showing on calendarWrong year selectedCheck the year filter matches your calendar date
Leave balance seems wrongHolidays not set up for that yearImport or create holidays for the relevant year
Cannot delete a holidayInsufficient permissionsOnly managers and admins can delete


Source Files:

  • src/components/holidays/HolidayManagement.tsx - Holiday management UI component
  • src/hooks/useCompanyHolidays.ts - Holiday data hook
  • src/lib/utils/company-holidays.ts - Shared holiday utilities
  • src/lib/utils/bank-holidays.ts - UK Government API integration
  • src/app/api/companies/[companyId]/holidays/route.ts - Holiday CRUD API
  • src/app/api/companies/[companyId]/holidays/import-bank-holidays/route.ts - Bank holiday import API