|
std::string | name () const override |
|
QuantLib::Date::serial_type | dayCount (const QuantLib::Date &d1, const QuantLib::Date &d2) const override |
|
QuantLib::Time | yearFraction (const QuantLib::Date &d1, const QuantLib::Date &d2, const QuantLib::Date &, const QuantLib::Date &) const override |
|
Definition at line 42 of file yearcounter.hpp.
◆ name()
std::string name |
( |
| ) |
const |
|
override |
◆ dayCount()
Date::serial_type dayCount |
( |
const QuantLib::Date & |
d1, |
|
|
const QuantLib::Date & |
d2 |
|
) |
| const |
|
override |
Definition at line 32 of file yearcounter.cpp.
32 {
33 return underlyingDCF.dayCount(d1, d2);
34}
◆ yearFraction()
Time yearFraction |
( |
const QuantLib::Date & |
d1, |
|
|
const QuantLib::Date & |
d2, |
|
|
const QuantLib::Date & |
, |
|
|
const QuantLib::Date & |
|
|
) |
| const |
|
override |
Definition at line 36 of file yearcounter.cpp.
36 {
37 Time t = underlyingDCF.yearFraction(d1, d2);
38
39 return std::floor(0.5 + t);
40}