Calculate total leave days
POST /api/calculate-total-days
Calculates the total number of leave days in a given leave request, based on the start and end date. The calculation takes into account the weekend days and public holidays for a given country.
Request
Body parameters
country string Required
The country where the leave will be taken, formatted as an ISO Alpha-2 code. The information will be used to account for the weekend days and public holidays in the calculation.
Example: JP
start_date string Required
The start date of the leave request, formatted as YYYY-MM-DD.
Example: 2023-12-31
end_date string Required
The end date of the leave request, formatted as YYYY-MM-DD.
is_half_start_date boolean Required
Whether the start date will be taken as a half day leave.
Default: False
is_half_end_date boolean Required
Whether the end date will be taken as a half day leave.
Default: False
Example Requests
Response (200)
totaldays integer
The total number of leave days in a given leave request.