Version 3 of API Services Released
Features and Improvements
Version 3 allows you to get more data using fewer requests instead of making multiple requests for a variety of data. Instead of specifying a single object or parameter, you can now specify multiple parameter values and get a larger return set with a single request.
You can keep track of the cost of your queries via the “billing” element of the returning result.
Existing customers with a valid license already have access to the new and improved features described below.
Version 3 of our Holidays API Services includes these new features:
- Multiple countries per query: Get holiday data for all countries in one go instead of having to make separate queries for each country.
- Multiple languages per query: Get holiday names and oneliners in different languages using only one query instead of having to make multiple queries.
- Fun Holidays Database: Our Fun Holidays database is now also available through our API. To query, simply specify
country=funwhen requesting data from the Holidays API. The "types" parameter will automatically be set to
types=funin the service, so this field can be omitted.
Improved Feature: Added Holiday Types
You will now have more granular control of the holiday types you wish to receive. We have added five new types of holidays:
defacto– days that aren't official holidays but are traditionally treated as such by businesses, offices, and the general population
halfday– these usually start as regular working days but the second half of the day is off for workers (e.g., the day before Maundy Thursday in Norway)
optional– in some countries, employees can choose a limited number of optional holidays per year as non-working days (these are often religious festivities)
otherreligion– religious holidays not categorized under one of the major world religions
sport– sporting events
This iteration of the Astronomy API offers more precision in querying for astronomical calculations by allowing you to query not only for dates but also for specific times. New features include:
- Moon Orientation: Query the current orientation of the Moon. This element, called
posangle, provides the angle of the line connecting the geometric center of the Moon's disk to the midpoint of the illuminated lunar limb, measured counter-clockwise from the top.
- Astrodata: The
astrodataservice lets you query at an even more granular level. Instead of querying for a specific date or a range of dates, you can now specify up to 50 different ISO 8601 timestamps in a single query, specify multiple objects at the same time (e.g., calculate for both the Sun and the Moon), and make a calculation for all timestamps, at all locations, and for all objects in one go.
Improved Feature: Increased Precision
The timestamp for all featured events now also includes seconds, in addition to hours and minutes.
Business Date and Business Days API
For these two API Services, which allow you to calculate the number of business days between two dates (or simply the number of days), we have added one of the same new features as for the Holidays API Service:
- Multiple languages per query: Receive holiday names and oneliners in the different languages we have available in our database.
We strongly advise our customers to use HMAC-based authentication when querying our API Services. While we do offer alternative methods for authentication, this one is by far the most secure. Find out how to create an HMAC-based signature in the chapter on authentication in the API Service documentation.
We have now created an interactive API Signature Calculator that describes and visualizes the process of creating a signature, making it easier for you as a developer to create this for your programming language.
Why a new version number?
We strive to ensure 100% backward compatibility when launching new features in our APIs. This means that we may introduce new features in existing versions of our API, as long as their implementation does not change the current format and functions. As our customer, you can be sure that requests that worked yesterday will continue to work today and tomorrow.
When increasing the version number, we allow for potentially breaking changes to backward compatibility of both the request parameters and the response format. Requests that returned one kind of format in version 2 may return another type of format in version 3. A good example of this are the names of holidays in different languages. Previously, when querying for holidays in a specific language, you would receive a single result showing the name of the holiday in that specific language; now, that same field can include an array of multiple translations of that holiday name.
Get Started Now!
If you are not already a Time and Date API customer, you can start via our Getting Started Page!
If you already are a Time and Date API customer, all of these features are already available in the services for which you have a license!
You can start testing the new features and improvements in our APIs in the Query Builder.
Announcing New Calculator Services!
Developers can use the Calculator Services to calculate either time spans or dates, including or excluding business days, in 170+ countries.
Reliable Working Date Calculations
Business days vary from country to country depending on several factors like national, local, or religious holidays, and different weekend conventions. The Calculator Services allow access to timeanddate.com's Time Zones and Holidays databases which are constantly being updated and extended.
Add or Subtract Working Days
The Business Date Service allows you to add or subtract a number of business days from a start date, taking into account the holiday and weekend schedule for a location of your choice.
Count Working Days
Perhaps you already know the end date and are more interested in how many actual working days are between a start date and end date? In this case, our Business Duration Service allows you to request the number of working days between the two dates you specify.
The returned data in XML or JSON will give you the information about which holidays exist in the period you requested. At the same time, the reply provides IDs and URLs that you can use in our Holidays Services to get even more information. We also return the data we have parsed from your request.
You can specify different parameters to customize your query, such as whether or not specific days should be included in the calculation, or excluded. Weekends and holidays can also be included or excluded in the same manner.
Get Started Now!
If you are not already a Time and Date API customer, you can start by visiting our Getting Started Page!
If you already are a Time and Date API customer, please visit our Calculator Packages!
After you're registered as a Time and Date API customer, you can start testing the APIs in our Query Builder.
Download our Holiday Data as Spreadsheets
We have previously launched our vast holiday database of over 120+ countries as a data download service available in CSV and XML-formats. As of today we are happy to announce that you can now generate and download spreadsheets for holidays in an open source spreadsheet format!
- Data-aware content - Unlike regular text formats, spreadsheets are aware of the types in each cell which allows you to perform actions and calculation based on each data type.
- Calendar layout - In addition to an overview of every holiday, you can also generate a calendar showing every day of the year.
- Software Compatibility - The spreadsheet is available in Open Office XML format, compatible with Microsoft Excel 2007 and later, LibreOffice, OpenOffice 3.0 and later.
In addition to the format-specific features of the spreadsheet, the dataset will include:
- Names and dates - Our team of researchers makes sure you can rely on this essential information.
- Types of holiday - Worldwide, National, Local, Religious and more.
- Locations - In which areas is the holiday observed?
- States - In which states, provinces, or territories of a country is it observed?
- Also includes several types of meta data associated with each holiday.
More Data Download Packages
Daylight Saving Time (DST) and time zone information for all countries worldwide.
Get astronomical data for a location of your choice.