BloombergLP::bbldc::PeriodDayCountUtil::yearsDiff

See the corresponding bsl::vector overload above.

Synopsis

Declared in <bbldc_perioddaycountutil.h>

static
double
yearsDiff(
    bdlt::Date const& beginDate,
    bdlt::Date const& endDate,
    std::vector<bdlt::Date> const& periodDate,
    double periodYearDiff,
    DayCountConvention::Enum convention);

Return Value

signed fractional year difference according to convention

Parameters

NameDescription
beginDatestart of the date range
endDateend of the date range
periodDatesorted unique period-boundary dates
periodYearDiffyear fraction of each period
conventionday-count convention to apply