|
From: Luigi B. <lui...@gm...> - 2021-09-09 09:30:50
|
Hello,
yes, it's unintended - see
https://github.com/lballabio/QuantLib/issues/996
Luigi
On Sat, Sep 4, 2021 at 4:11 AM jian Xu <jia...@gm...> wrote:
> Hi,
> This short function returns the business days from "from" to "to",
> both are inclusive. Therefore, it should be allowed to call it with
> from == to, or the condition in QL_REQUIRE should be to >= from,
> instead of to > from. Am I correct? Thanks.
>
> Jian
>
> std::vector<Date> Calendar::businessDayList(
> const Date& from, const Date& to) const {
>
> QL_REQUIRE(to>from, "'from' date ("
> << from << ") must be earlier than 'to' date ("
> << to << ")");
> std::vector<Date> result;
> for (Date d = from; d <= to; ++d) {
> if (isBusinessDay(d))
> result.push_back(d);
> }
> return result;
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|