This site is outdated.

Visit the new site: dev.timeanddate.com

Recent News

RSS

New Endpoint for Licenses and Credits

Thursday, January 30, 2020

Wondering how many credits you have left in your account? Want to set a reminder to renew your licenses? We have now made it easier for you to find out all the relevant information you need to keep your accounts and licenses up-to-date.

The License Overview console gives you a quick overview of your account including all the licenses you currently own, their purchase and validity dates, and the number of requests left for each license.

We are now launching a programmatic way of accessing this information. Use our new Account API Endpoint to get all the relevant data about your account and licenses in XML or JSON.

Using this new service you can now retrieve

  • The number of request credits left on your account
  • The licenses available on your account, when they were purchased and when they expire
Use this service to integrate your account information into your chatbots, reporting dashboard and other systems.

Find out more about the Account Endpoint

Version 3 of API Services Released

Wednesday, November 13, 2019
The latest version of our API Services enables you to get more out of our API with less effort, and it includes many features and improvements requested by our customers.
Illustration image

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.

Holidays API

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=fun when requesting data from the Holidays API. The "types" parameter will automatically be set to types=fun in 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

Astronomy API

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 astrodata service 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.

Signature Calculator

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.

Related Links

Announcing New Calculator Services!

Friday, April 29, 2016
Time and Date is pleased to announce the launch of our brand-new Calculator Services!

Developers can use the Calculator Services to calculate either time spans or dates, including or excluding business days, in 170+ countries.

Illustration image

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.

Extensive Information

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.

Related Links

Terms & ConditionsCopyright © Time and Date AS
All data supplied by timeanddate.com