wilsonfreitas / python-bizdays

Business days calculations and utilities
http://wilsonfreitas.github.io/python-bizdays/
MIT License
79 stars 34 forks source link

Verification Error #34

Open ygorml opened 1 year ago

ygorml commented 1 year ago

Hi! I got an unexpected error while trying to check a date using isbizday method.

>>> from bizdays import Calendar, load_holidays
>>> cal = Calendar.load("ANBIMA")
>>> cal.isbizday("2023-04-21")
False
>>> cal.isbizday('2023-04-20')
True

However, seeing the "ANBIMA.cal" file, we clearly visualize that 21 April's is a Holiday, but the bizday lib counts it as 20 April.

~ % python --version
Python 3.8.5
~ % uname -a
Darwin 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_X86_64 x86_64
wilsonfreitas commented 1 year ago

Hi Ygor, sorry for the late reply, I was on a trip.

I'm not sure If I got your question. The method isbizday returns False if the given date is a non-working day and True otherwise. Since 2023-04-21 is a holiday, so it's a non-working day.