Time is money, but calculating it correctly is harder than it looks. Libera.Date.Api is the ultimate solution for developers building HR systems, logistics platforms, and financial applications.
Stop wrestling with leap years, timezone anomalies, and shifting public holidays. Powered by the industry-standard NodaTime engine and our proprietary Working Days System, this API delivers:
Global Awareness: Built-in support for major economies (US, UK, DE, PL, FR) with accurate holiday calendars.
Business Logic Ready: Instantly calculate SLAs and delivery dates by excluding weekends and holidays.
Precision Engineering: Get exact durations down to the minute, or broad calendar period differences (Years/Months/Days).
Smart Fallbacks: Automatically find the next available working day when deadlines hit a holiday.
All requests must be authenticated. You can use either an API Key or a Bearer Token.
| Method | Header Name | Value Format |
|---|---|---|
| API Key | X-Api-Key |
YOUR_API_KEY |
| Bearer Token | Authorization |
Bearer YOUR_JWT_TOKEN |
Base URL: http://localhost:8080 (adjust to your deployment)
Calculates the calendar difference (Years, Months, Days).
URL: /date-calculator/period/date
Method: GET
Parameters:
Start (query, required): Start date (ISO 8601, e.g., 2024-01-01)
End (query, required): End date (ISO 8601, e.g., 2025-03-15)
Request:
curl -X GET "http://localhost:8080/date-calculator/period/date?Start=2024-01-01&End=2025-03-15" \
-H "X-Secret: TEST_SECRET"
Response (200 OK):
{
"years": 1,
"months": 2,
"days": 14,
"description": "1 year, 2 months, 14 days"
}
Calculates the duration in total days, hours, and minutes.
URL: /date-calculator/period/time
Method: GET
Parameters:
Start (query): 2024-01-01T12:00:00
End (query): 2024-01-05T18:30:00
Request:
curl -X GET "<http://localhost:8080/date-calculator/period/time?Start=2024-01-01T12:00:00&End=2024-01-05T18:30:00>" \
-H "X-Secret: TEST_SECRET"
Response (200 OK):
{
"totalDays": 4,
"hours": 102,
"minutes": 6150
}
Advanced logic for business days, weekends, and public holidays.
Path Parameter: {countryCode} (e.g., PL, US, DE, UK).
Checks if a specific date is a working day. If it is not (due to weekend or holiday), it returns the date of the next immediate working day.
URL: GET /workingdays/{countryCode}/is-working-day
Parameters:
Date (required, YYYY-MM-DD)
Example Request (Checking Christmas Day in US):
bash
curl -X GET "http://localhost:8080/workingdays/US/is-working-day?Date=2025-12-25"
Response (200 OK):
json{
"date": "2025-12-25T00:00:00",
"isWorkingDay": false,
"nearestWorkingDay": "2025-12-26T00:00:00"
}
Returns detailed metadata about why a day is not a working day. It distinguishes between weekends (specifying if it's the 1st or 2nd day of the weekend) and public holidays.
URL: GET /workingdays/{countryCode}/non-working-info
Parameters:
Date (required, YYYY-MM-DD)
Example Request:
bash
curl -X GET "http://localhost:8080/workingdays/PL/non-working-info?Date=2024-05-01"
Response (200 OK):
json{
"date": "2024-05-01T00:00:00",
"isNonWorkingDay": true,
"type": "holiday",
"weekendDayNumber": null,
"holiday": {
"englishName": "Labor Day",
"localName": "Święto Pracy"
}
}
Generates a comprehensive breakdown of a date range, splitting all dates into "Working" and "Non-Working" lists. Ideal for rendering calendars or Gantt charts.
URL: GET /workingdays/{countryCode}/range
Parameters:
Start (required): Range start.
End (required): Range end.
Note: Max range is limited by server configuration (default 366 days).
Example Request:
bash
curl -X GET "http://localhost:8080/workingdays/US/range?Start=2024-07-03&End=2024-07-05"
Response (200 OK):
json{
"start": "2024-07-03T00:00:00",
"end": "2024-07-05T00:00:00",
"workingDays": [
{ "date": "2024-07-03T00:00:00" },
{ "date": "2024-07-05T00:00:00" }
],
"nonWorkingDays": [
{
"date": "2024-07-04T00:00:00",
"type": "holiday",
"englishName": "Independence Day",
"localName": "Independence Day"
}
]
}
Calculates the number of business days between two dates. (excluding weekends and holidays).
URL: /workingdays/{countryCode}/count
Method: GET
Parameters:
Start (query): 2024-05-01
End (query): 2024-05-10
Request:
curl -X GET "<http://localhost:8080/workingdays/PL/count?Start=2024-05-01&End=2024-05-10>" \
-H "X-Secret: TEST_SECRET"
Response (200 OK):
{
"totalDays": 366,
"workingDays": 253
}
Returns the count of non-working days (weekends + holidays).
URL: /workingdays/{countryCode}/off-days
Method: GET
Request:
curl -X GET "<http://localhost:8080/workingdays/PL/off-days?Start=2024-05-01&End=2024-05-10>" \
-H "X-Secret: TEST_SECRET"
Response (200 OK):
{
"totalDays": 366,
"offDays": 113
}
Returns a list of public holidays in the given range.
URL: /workingdays/{countryCode}/holidays
Method: GET
Request:
curl -X GET "<http://localhost:8080/workingdays/PL/holidays?Start=2024-01-01&End=2024-01-10>" \
-H "X-Secret: TEST_SECRET"
Response (200 OK):
[
{
"date": "2024-01-01",
"name": "New Year's Day",
"localName": "Nowy Rok"
},
{
"date": "2024-01-06",
"name": "Epiphany",
"localName": "Święto Trzech Króli"
}
]
Returns the number of weekend days (Saturdays and Sundays).
URL: /workingdays/{countryCode}/weekends
Method: GET
Request:
curl -X GET "<http://localhost:8080/workingdays/PL/weekends?Start=2024-05-01&End=2024-05-10>" \
-H "X-Secret: TEST_SECRET"
Response (200 OK):
{
"totalDays": 91,
"weekendDaysCount": 26
}
Healthy
curl --location --request GET 'https://zylalabs.com/api/11640/edit+libera+date+and+buisness+days+calculator+api/21974/health' --header 'Authorization: Bearer YOUR_API_KEY'
{"date":"2026-01-06T00:00:00","isWorkingDay":false,"nearestWorkingDay":"2026-01-07T00:00:00"}
curl --location --request GET 'https://zylalabs.com/api/11640/edit+libera+date+and+buisness+days+calculator+api/21978/is+working+day?Date=2026-01-06&countryCode=Required' --header 'Authorization: Bearer YOUR_API_KEY'
{"date":"2026-01-06T00:00:00","nearestWorkingDay":"2026-01-07T00:00:00","isSameDay":false}
curl --location --request GET 'https://zylalabs.com/api/11640/edit+libera+date+and+buisness+days+calculator+api/21981/nearest+working+day?Date=2026-01-06&countryCode=Required' --header 'Authorization: Bearer YOUR_API_KEY'
{"date":"2026-01-06T00:00:00","isNonWorkingDay":true,"type":"holiday","weekendDayNumber":null,"holiday":{"englishName":"Epiphany","localName":"Święto Trzech Króli"}}
curl --location --request GET 'https://zylalabs.com/api/11640/edit+libera+date+and+buisness+days+calculator+api/21982/non+working+day+info?Date=2026-01-06&countryCode=Required' --header 'Authorization: Bearer YOUR_API_KEY'
{"start":"2026-01-01T00:00:00","end":"2026-01-31T00:00:00","workingDays":[{"date":"2026-01-02T00:00:00"},{"date":"2026-01-05T00:00:00"},{"date":"2026-01-07T00:00:00"},{"date":"2026-01-08T00:00:00"},{"date":"2026-01-09T00:00:00"},{"date":"2026-01-12T00:00:00"},{"date":"2026-01-13T00:00:00"},{"date":"2026-01-14T00:00:00"},{"date":"2026-01-15T00:00:00"},{"date":"2026-01-16T00:00:00"},{"date":"2026-01-19T00:00:00"},{"date":"2026-01-20T00:00:00"},{"date":"2026-01-21T00:00:00"},{"date":"2026-01-22T00:00:00"},{"date":"2026-01-23T00:00:00"},{"date":"2026-01-26T00:00:00"},{"date":"2026-01-27T00:00:00"},{"date":"2026-01-28T00:00:00"},{"date":"2026-01-29T00:00:00"},{"date":"2026-01-30T00:00:00"}],"nonWorkingDays":[{"date":"2026-01-01T00:00:00","type":"holiday","englishName":"New Year's Day","localName":"Nowy Rok"},{"date":"2026-01-03T00:00:00","type":"weekend","weekendDayNumber":1},{"date":"2026-01-04T00:00:00","type":"weekend","weekendDayNumber":2},{"date":"2026-01-06T00:00:00","type":"holiday","englishName":"Epiphany","localName":"Święto Trzech Króli"},{"date":"2026-01-10T00:00:00","type":"weekend","weekendDayNumber":1},{"date":"2026-01-11T00:00:00","type":"weekend","weekendDayNumber":2},{"date":"2026-01-17T00:00:00","type":"weekend","weekendDayNumber":1},{"date":"2026-01-18T00:00:00","type":"weekend","weekendDayNumber":2},{"date":"2026-01-24T00:00:00","type":"weekend","weekendDayNumber":1},{"date":"2026-01-25T00:00:00","type":"weekend","weekendDayNumber":2},{"date":"2026-01-31T00:00:00","type":"weekend","weekendDayNumber":1}]}
curl --location --request GET 'https://zylalabs.com/api/11640/edit+libera+date+and+buisness+days+calculator+api/21983/workingdays++range?Start=2026-01-01&End=2026-01-31&countryCode=Required' --header 'Authorization: Bearer YOUR_API_KEY'
{"totalDays":366,"workingDays":251}
curl --location --request GET 'https://zylalabs.com/api/11640/edit+libera+date+and+buisness+days+calculator+api/21973/workingdays+count?Start=2025-01-01&End=2026-01-01&countryCode=Required' --header 'Authorization: Bearer YOUR_API_KEY'
{"totalDays":366,"offDays":115}
curl --location --request GET 'https://zylalabs.com/api/11640/edit+libera+date+and+buisness+days+calculator+api/21975/off-days?Start=2025-01-01&End=2026-01-01&countryCode=Required' --header 'Authorization: Bearer YOUR_API_KEY'
{"totalDays":366,"weekendDaysCount":104}
curl --location --request GET 'https://zylalabs.com/api/11640/edit+libera+date+and+buisness+days+calculator+api/21976/weekend+count?Start=2025-01-01&End=2026-01-01&countryCode=Required' --header 'Authorization: Bearer YOUR_API_KEY'
{"count":15,"holidays":[{"date":"2025-01-01T00:00:00","englishName":"New Year's Day","localName":"Nowy Rok"},{"date":"2025-01-06T00:00:00","englishName":"Epiphany","localName":"Święto Trzech Króli"},{"date":"2025-04-20T00:00:00","englishName":"Easter Sunday","localName":"Wielkanoc"},{"date":"2025-04-21T00:00:00","englishName":"Easter Monday","localName":"Drugi Dzień Wielkanocy"},{"date":"2025-05-01T00:00:00","englishName":"May Day","localName":"Święto Pracy"},{"date":"2025-05-03T00:00:00","englishName":"Constitution Day","localName":"Święto Narodowe Trzeciego Maja"},{"date":"2025-06-08T00:00:00","englishName":"Pentecost","localName":"Zielone Świątki"},{"date":"2025-06-19T00:00:00","englishName":"Corpus Christi","localName":"Boże Ciało"},{"date":"2025-08-15T00:00:00","englishName":"Assumption Day","localName":"Wniebowzięcie Najświętszej Maryi Panny"},{"date":"2025-11-01T00:00:00","englishName":"All Saints' Day","localName":"Wszystkich Świętych"},{"date":"2025-11-11T00:00:00","englishName":"Independence Day","localName":"Narodowe Święto Niepodległości"},{"date":"2025-12-24T00:00:00","englishName":"Christmas Eve","localName":"Wolna Wigilia"},{"date":"2025-12-25T00:00:00","englishName":"Christmas Day","localName":"Boże Narodzenie"},{"date":"2025-12-26T00:00:00","englishName":"St. Stephen's Day","localName":"Drugi Dzień Bożego Narodzenia"},{"date":"2026-01-01T00:00:00","englishName":"New Year's Day","localName":"Nowy Rok"}]}
curl --location --request GET 'https://zylalabs.com/api/11640/edit+libera+date+and+buisness+days+calculator+api/21977/public+holidays?Start=2025-01-01&End=2026-01-01&countryCode=Required' --header 'Authorization: Bearer YOUR_API_KEY'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
Each endpoint returns JSON data tailored to specific date calculations. For example, the "Count Working Days" endpoint returns the total number of business days between two dates, while the "List Public Holidays" endpoint provides details about holidays within a specified range.
Key fields vary by endpoint. For instance, the "Get Off-Days Count" endpoint returns "totalDays" and "offDays," while "Get Detailed Non-Working Info" includes "date," "isNonWorkingDay," and "holiday" details like "englishName" and "localName."
Parameters differ by endpoint. For example, the "Check Working Day" endpoint requires a "Date" parameter, while the "Analyze Range" endpoint needs "Start" and "End" dates. Each parameter must follow specific formats, such as YYYY-MM-DD for dates.
Response data is structured in JSON format, typically containing a main object with relevant fields. For example, the "Analyze Range" endpoint returns "workingDays" and "nonWorkingDays" as arrays of date objects, making it easy to parse and utilize.
The API utilizes the industry-standard NodaTime engine and proprietary algorithms to ensure accurate date calculations. Data for public holidays and weekends is sourced from reliable national calendars for over 100 countries.
Common use cases include calculating SLAs, planning delivery schedules, and managing HR rosters. For instance, businesses can use the "Count Working Days" endpoint to determine deadlines while accounting for holidays and weekends.
Users can customize requests by specifying parameters like date ranges and country codes. For example, when using the "List Public Holidays" endpoint, users can define the "Start" and "End" dates to retrieve holidays relevant to their specific timeframe.
Users can leverage the structured JSON responses to integrate date calculations into applications. For example, the "Get Weekends Count" response can be used to adjust project timelines by accounting for non-working days in scheduling software.
The "Get Off-Days Count" endpoint provides the total number of non-working days within a specified date range, including both weekends and public holidays. This helps businesses understand potential downtime during a given period.
You can use the "Check Working Day & Find Nearest" endpoint. By providing a date, the API will return whether it's a working day and, if not, the nearest subsequent working day, allowing for effective scheduling.
The "Analyze Range" endpoint allows you to analyze a maximum date range of 366 days, as configured by the server settings. This is useful for generating comprehensive working and non-working day lists over a year.
The API includes built-in support for over 100 countries, utilizing reliable national calendars to accurately reflect public holidays. This ensures that calculations for business days are precise and relevant to the specified country.
The response includes fields such as "date," "isWorkingDay" (boolean), and "nearestWorkingDay" (date). This structure allows users to quickly assess the status of a date and plan accordingly.
Use the "List Public Holidays" endpoint by specifying the country code and the desired date range. The response will include an array of holidays, detailing each holiday's date and name, which is essential for planning around non-working days.
This endpoint returns detailed metadata about why a specific date is non-working, including whether it's a weekend or a public holiday, along with the holiday's name in both English and the local language, enhancing clarity for users.
The "Count Working Days" endpoint returns the total number of business days between two dates, excluding weekends and holidays. This data can be used to set realistic deadlines and manage project timelines effectively.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
Service Level:
100%
Response Time:
270ms
Service Level:
100%
Response Time:
454ms
Service Level:
100%
Response Time:
353ms
Service Level:
100%
Response Time:
434ms
Service Level:
100%
Response Time:
3,016ms
Service Level:
100%
Response Time:
73ms
Service Level:
100%
Response Time:
157ms
Service Level:
100%
Response Time:
472ms
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
478ms