|
From: Ferdinando A. <na...@am...> - 2009-10-21 09:51:15
|
Hi Alexander
> I've got an exception using the Date class Leap function. I've checked the
> code and found out that the function is limited to the range 1900..2200.
The
> implementation of the leap function is quite simple. Is there a
performance
> reason to implement it like this? If it is possible I would like to extend
> this function.
I suggest you to just replace the current implementation with
#include <boost/date_time/gregorian/gregorian.hpp>
[...]
namespace QuantLib {
[...]
bool Date::isLeap(Year y) {
return boost::gregorian::gregorian_calendar::is_leap_year(y);
}
[...]
}
I will commit this change unless objections are raised
ciao -- Nando
PS any volunteer for QuantLib::Date boostification, i.e. usage of
boost::gregorian in the implementation of QuantLib::Date ?
|