LSEG Data Library for TypeScript

About DatesAndCalendars Holidays

Holidays returns the holidays between the defined start and end dates using one or more specified calendars.

IPA.DatesAndCalendars.Holidays.Definition object

This object creates the definition of information about the Holidays that we want to get.

Syntax

DatesAndCalendars.Holidays.Definition(params: DatesAndCalendars.Holidays.Params)

Parameters

Value Description Data type Optional Default value
params An object literal of type DatesAndCalendars.Holidays.Params. object No -

Holidays.Params properties

Value Description Data type Optional Default value
tag A user-defined string to identify the request. string Yes -
startDate The start date of the computation. The value is expressed in ISO 8601 format. string No -
endDate The end date of the computation. The value is expressed in ISO 8601 format. string No -
calendars The list of comma-separated calendar codes used for computation. string[] Yes -
currencies The list of comma-separated currency codes used for computation. string[] Yes -
holidayOutputs Additional information about the holiday in case the resulted date falls on the holiday (see HolidayOutput). enum Yes -
extendedParams Additional parameters to apply to the request. object Yes -

Returned value

ContentDefinition object.

Usage

The following example demonstrates how to create a definition for holidays:

import { IPA } from '@lsegroup/data';

const definition = IPA.DatesAndCalendars.Holidays.Definition({
    tag: 'My request',
    startDate: '2020-01-01',
    endDate: '2021-01-01',
    calendars: ['UKR', 'FRA'],
    currencies: ['EUR'],
});
`
180 words (0:57 mins)