I.e., there is one too many elements in the output vector (wrongly includes 2021-09-01). The issue lies in the function get_size. Instead of returning Int(ceil(ceil(Dates.value(td - ed) / 30) / Dates.value(p))), it looks like the function should return 12*(Dates.year(td) - Dates.year(ed)) + (Dates.month(td) - Dates.month(ed)) + 1
I am getting wrong schedule output in couple of situations. Here is one example:
The output starts as follows:
I.e., there is one too many elements in the output vector (wrongly includes 2021-09-01). The issue lies in the function get_size. Instead of returning Int(ceil(ceil(Dates.value(td - ed) / 30) / Dates.value(p))), it looks like the function should return 12*(Dates.year(td) - Dates.year(ed)) + (Dates.month(td) - Dates.month(ed)) + 1