Nager Api and date holidays
Posted by justusiam@reddit | learnprogramming | View on Reddit | 3 comments
Nager Api and date holidays
I just thought of what if I want to have a dynamic greeting message for my apps that detect time, holidays and renders the correct greeting. For the first login welcome[name] after 5 minutes good morning, evening or afternoon. If. Holiday happy[holiday name]. I have come across nager api. Who has used it and does it have challenges. And is there a well maintained library for this especially for us related.
Emergency-Pack1993@reddit
been using nager for a side project and it works pretty well for the basic stuff. the us holidays coverage is solid but youll want to double check some of the regional ones since they can be hit or miss
one thing that caught me off guard is the rate limiting isnt super clear in their docs so just keep that in mind if youre planning heavy usage. also their holiday names sometimes dont match what youd expect so you might need to do some mapping
for the greeting logic part that actually seems like the trickier piece since youll need to handle timezones properly. are you planning to use the users local time or server time
TheNorthMind@reddit
The project is open source, and you can easily report any errors if the naming is incorrect. There are certain holidays that may have multiple names.
justusiam@reddit (OP)
I am planning to use the users local time,,, I have also thought of using date-holiday library though from my research it adds more bundle size to the app version.