LSEG Data Library for TypeScript

IPA.DatesAndCalendars.CountPeriods.Definitions object

This object creates a definition for one or more CountPeriod definition(s) that we want to get.

Syntax

DatesAndCalendars.CountPeriods.Definitions(definitions: Array<ContentDefinition<any, DatesAndCalendars.CountPeriods.Params>>)

Parameters

Value Description Data type Optional Default value
params An array of DatesAndCalendars.CountPeriods definitions. object No -

Returned value

ContentDefinition object.

Usage

The following example demonstrates how to create a single definition for multiple count periods definitions:

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

const countPeriodsDefinition1 = IPA.DatesAndCalendars.CountPeriods.Definition({
    tag: 'My request',
    endDate: '2018-02-01',
    startDate: '2017-01-01',
    calendars: ['FMU'],
    dayCountBasis: IPA.DayCountBasisConvention.Dcb_30_360,
});

const countPeriodsDefinition2 = IPA.DatesAndCalendars.CountPeriods.Definition({
    endDate: '2018-02-01',
    startDate: '2017-01-01',
    calendars: ['EMU'],
    periodType: IPA.DatesAndCalendars.PeriodType.Year,
});

const definitions = IPA.DatesAndCalendars.CountPeriods.Definitions([countPeriodsDefinition1, countPeriodsDefinition2]);
`

None.

53 words (0:17 mins)