LSEG Data Library for TypeScript

About DatesAndCalendars IsWorkingDays

IsWorkingDays returns whether a date is a working day or not.

IPA.DatesAndCalendars.IsWorkingDay.Definition object

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

Syntax

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

Parameters

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

IsWorkingDay.Params properties

Value Description Data type Optional Default value
tag A user-defined string to identify the request. string Yes -
date The date which must be checked if it is a working day or not. 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 is-working-day:

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

const definition = IPA.DatesAndCalendars.IsWorkingDay.Definition({
    tag: 'My request tag',
    date: '2021-01-01',
    calendars: ['FMU'],
    holidayOutputs: [
        IPA.DatesAndCalendars.HolidayOutput.Date,
    ],
});
`
165 words (0:52 mins)