Closed rrremedio closed 2 years ago
No, it's not wrong, it's documented.
Please, read the docs https://cran.r-project.org/web/packages/bizdays/vignettes/Financial_and_non_financial.html
This is a usual misunderstanding.
It happens everytime a nonworking day is used in from
or to
arguments.
is.bizday(c("2022-09-30", "2022-10-01"), "Brazil/ANBIMA")
bizdays version 1.0.11
'bizdays' is returning wrong values.
Reproducible example (September 2022 has 21 business days with Anbima calendar):
bizdays("2022-09-01", "2022-09-30", "Brazil/ANBIMA")
20
bizdays("2022-09-01", "2022-10-01", "Brazil/ANBIMA")
20
However, that's correct:
length(bizseq(dmy("01/09/2022"), dmy("01/10/2022"), "Brazil/ANBIMA"))
21