get_next_payment_date
Calculate next valid payment date for European countries, skipping weekends and public holidays. Supports rules like last working day of month for salary payments.
Instructions
Calculates the next valid payment date based on a reference date and a payment rule for a given European country, skipping weekends and national public holidays. Supports rules: 'last_working_day_of_month' (salary payment), 'first_working_day_of_month', 'nth_working_day' (e.g. 5th working day), 'next_working_day' (next business day after reference). Returns { country, reference_date, rule, result_date, notes }. Use when scheduling salary payments, invoice due dates, or any automated payment workflow that must avoid non-working days.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| country_code | Yes | Two-letter ISO country code. Example: 'PT', 'DE', 'FR' | |
| reference_date | Yes | Reference date in YYYY-MM-DD format. Example: '2026-01-31' | |
| rule | Yes | Payment rule to apply. | |
| n | No | For nth_working_day rule: which working day of the month. Example: 5 for 5th working day. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| country | No | ||
| reference_date | No | ||
| rule | No | ||
| result_date | No | ||
| error | No |