Closed simader closed 2 years ago
Input parameter region is mandatory for USA - see https://kayaposoft.com/enrico/json/
I understand meaningful error message is needed here. I'll add it to my TODO list.
Thanks for your answer. But why do you not just return all holidays of this country?
For Example for Germany or Great Britainit is working: https://kayaposoft.com/enrico/json/v2.0/?action=getHolidaysForYear&year=2022&country=GER&holidayType=public_holiday
No, not all holidays for the country are returned. Just those holidays are returned which are the same across all regions. So not union but intersection. In USA intersection is simply empty, that is why no holidays are returned.
Hello, I just tried to query all regions from USA and there are many holidays intersecting. For Example New Year's Day:
Yes, but each state has different rules what happens if public holiday falls on Saturday or Sunday. That is why the holidays are not considered to be equal in USA. The rules to calculate common holidays (like New Year's Day, Independence Day etc.) in USA are different across regions. These rules are then part of region-specific code and are not included for the whole country.
This API Call does not return anything.
https://kayaposoft.com/enrico/json/v2.0/?action=getHolidaysForYear&year=2022&country=USA&holidayType=public_holiday
Other Countries are working