LSEG Data Library for TypeScript

IPA.DatesAndCalendars.DateSchedule.Definition object

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

Syntax

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

Parameters

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

DateSchedule.Params properties

Value Description Data type Optional Default value
count A number is used to define a list of dates from the start date (or today if the start day is not set) to the end date. number No -
startDate The start 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 -
frequency The frequency of dates in the predefined period (see Frequency). enum Yes -
calendarDayOfMonth The number of the day of the month to which dates are adjusted. The first date in the list is defined as the corresponding day of the month to which the start date belongs. number Yes -
dayOfWeek The day of week to which dates are adjusted (see DayOfWeek. 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 data schedule:

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

const definition = IPA.DatesAndCalendars.DateSchedule.Definition({
    startDate: '2019-04-30',
    count: 10,
    frequency: IPA.DatesAndCalendars.Frequency.Weekly,
    calendars: ['EMU', 'GER'],
    dayOfWeek: IPA.DatesAndCalendars.DayOfWeek.Tuesday,
});
`
213 words (1:07 mins)