yearsDiff overloads

Synopses

Declared in <bbldc_perioddaycountutil.h>

Return the (signed fractional) number of years between two dates.

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

See the corresponding bsl::vector overload above.

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

See the corresponding bsl::vector overload above.

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

Name

Description

beginDate

start of the date range

endDate

end of the date range

periodDate

sorted unique period‐boundary dates

periodYearDiff

year fraction of each period

convention

day‐count convention to apply

Created with MrDocs