bank_holidays
Get bank/public holidays for a country with payment impact analysis.
Returns all public holidays plus a 'payment_impact' section that shows:
Whether today is a business day or holiday in this country
Upcoming holidays in the next 14 days
Recent holidays in the last 14 days — for diagnosing a payment that is ALREADY stuck ("in progress for N days", "sent X days ago"). A recent holiday only counts if BOTH hold: it falls INSIDE the payment's own window (on or after the send date), AND its 'costs_a_business_day' is true. One that predates the send date is irrelevant, and one on the country's banking weekend closed nothing that was open — neither may be subtracted or given to the user as a cause. An empty list affirmatively means no recent holiday explains the delay — do not invent one from training data.
Every holiday entry (upcoming, recent, and next_holiday_after_today) carries 'costs_a_business_day'. Roughly one holiday date in six lands on its own country's weekend and shortens nothing; check the flag before quoting a holiday as a delay, a closure or a reason a window was short.
elapsed_business_days_by_send_date — the AUTHORITATIVE elapsed business-day count keyed by send date (weekends + this country's holidays already excluded). Use it verbatim instead of hand-counting.
Next business day and how many consecutive non-business days remain This context helps determine if holidays are causing payment delays.
Args: country_code: ISO 3166-1 alpha-2 code (e.g., "US", "DE", "GB") year: Year (default: current year). Range: 2020-2030.
Examples: bank_holidays("US") bank_holidays("DE", 2026) bank_holidays("GB", 2025)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | ||
| country_code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||