python-bizdays icon indicating copy to clipboard operation
python-bizdays copied to clipboard

Verification Error

Open ygorml opened this issue 2 years ago • 1 comments

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

ygorml avatar Apr 09 '23 22:04 ygorml

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.

wilsonfreitas avatar Apr 13 '23 08:04 wilsonfreitas