The Workdays Calculation API allows you to calculate the date after a given number of workdays, taking into account weekends and holidays. By specifying the country code, number of workdays, start date, and options, you can retrieve the ISO date of the day after the workdays have passed.
The API expects the following GET parameters:
state
(required): The country code for which the workdays are calculated. Please refer to the list of country codes to find the appropriate code for your country.
work_days
(required): The number of workdays to calculate. This indicates how many workdays should be skipped before determining the result.
start_date
(required): The starting date from which to begin counting the workdays. The format of the start date should be DD/MM/YYYY
.
options
(optional): The options for skipping specific days. This parameter accepts the following values:
0
: Skip holidays and weekends.1
: Skip only weekends.2
: Skip only holidays.The API response will be a string representing the ISO date of the day after the specified workdays have passed.
Given start_date
of 19/05/2023, which is Friday, and work_days
of 2,
the returned result will be 23/05/2023. Here’s the breakdown of the calculation:
Therefore, 23/5 is the day after the specified workdays have passed