get public holiday of a country [Answered]

Qqian9/26/2022
hi all, how do we check if a specific date is a public holiday in a country using c#? i try to use https://github.com/nager/Nager.Date nager package but it's only for people who sponsor this bcs a license is needed, there's a public api that we can use, but only limited to check if today is a public holiday, not to check if specific date is a holiday, can anybody help to advise? thank you so much in advance
PPobiega9/26/2022
You'll need a datasource for public holiday information.
PPobiega9/26/2022
Also, the nager API seems just fine?

https://date.nager.at/api/v3/PublicHolidays/2022/SE
PPobiega9/26/2022
you specify year and country and you get all public holidays for that year
Qqian9/26/2022
i was trying to check for a specific date range, for example if from 24 September 2022 - 28 October 2022 there's any public holiday, but after thinking for a while, i think it's better to get all public holidays of the year rather than calling an api several times..
PPobiega9/26/2022
yup
Qqian9/26/2022
thank you for your help! 🙏
PPobiega9/26/2022
yw.
AAccord9/26/2022
✅ This post has been marked as answered!