New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IsPublicHoliday(DateTime date, CountryCode countryCode) result inconsistent with GetPublicHoliday(DateTime startDate, DateTime endDate, CountryCode countryCode) #221
Comments
It is only a holiday in a county not in the full country.
|
I realized that after some more research. |
In the other method you must check this field
|
What would your implementation for the problem look like? |
After realizing this, we added a check on PublicHoliday.Global when using GetPublicHoliday(startDate,endDate,countryCode). |
Thank-you both, this thread helped me resolve an issue in here in the UK. As Easter Monday, is a bank holiday in England, but not Scotland. I adjusted our API calls to include the
|
Important specifications
DateSystem.IsPublicHoliday(date: new DateTime(2020, 11, 18), CountryCode.DE) returns false
However:
DateSystem.GetPublicHoliday(startDate: new DateTime(2020, 11, 18), endDate: new DateTime(2020, 11, 19), CountryCode.DE)
returns a list which includes the DateTime(2020, 11, 18).
Description
The two aforementioned methods return results which are inconsistent.
From a quick Google search, it seems this is indeed a public holiday, so the second result seems to be correct, rather than the first.
The text was updated successfully, but these errors were encountered: