|
From: Francois B. <ig...@gm...> - 2014-06-06 08:56:45
|
Hi,
In schedule.cpp, lines 349 - 355:
if (convention == Unadjusted) {
for (Size i=1; i<dates_.size()-1; ++i)
dates_[i] = Date::endOfMonth(dates_[i]);
} else {
for (Size i=1; i<dates_.size()-1; ++i)
dates_[i] = calendar_.endOfMonth(dates_[i]);
}
And calendar.hpp: lines 207-209:
inline Date Calendar::endOfMonth(const Date& d) const {
return adjust(Date::endOfMonth(d), Preceding);
}
This is applicable when the endOfMonth rule is *true*. If the business day
convention is Unadjusted, it works fine, but if the business day convention
is e.g. Modified Following, the second part of the code is executed. But
calendar_.endOfMonth is hardcoded to use Preceding. The actual business day
convention isn't passed through. Is this a bug or maybe I don't understand
something?
regards
Francois Botha
|