previous_business_day
Find the last business day before a given date for any country, correctly handling weekends and public holidays. Ideal for determining the prior working day before a holiday or weekend.
Instructions
USE THIS to find the most recent working day before a date (e.g. the last open day before a holiday) instead of guessing. Returns the first business day strictly before the given date for that country.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Date, YYYY-MM-DD. | |
| country | Yes | ISO 3166-1 alpha-2 country code, e.g. US, GB, AE, SA, ZA. | |
| extraHolidays | No | Optional extra non-working dates (YYYY-MM-DD), e.g. a company shutdown day. |