Hacker News new | past | comments | ask | show | jobs | submit login

This is also how we do it, but it’s the “obvious” solution the moment you realize that holidays don’t fall on the same days each year. It’s simple enough to predict the day they’ll fall on, but why bother with that when it takes someone 2 minutes every year to just enter these days in?



And then some king dies in some country and it's a national holiday the next week, and the data entry guy is in sick leaves and your table isn't updated to close trading... happened to the bank I work in, wasn't funny.


I don’t think there’s an algorithm accurate enough to predict the death of that king down to a specific day.

You’re still going to need that data entry guy. (Plus the two more that is the root problem)


Well, there is one algorithm accurate enough.


Regicide


> data entry guy is in sick leaves

if this data entry was so important, why is there only one guy responsible for it? where's the backup? where's the redundancy?


Well-designed human-involved processes try to reduce “once in a blue moon” edge-cases, sometimes at the cost of overall optimisation, in large part because people will forget how to do them, people will forget to keep building in redundancy, etc.


How would this surprise one-off holiday be accounted for programmatically? Does the government provide an API you can ping every day? Or you scrape the news feeds and feed it through ChatGPT?


For the UK at least, there’s https://www.gov.uk/bank-holidays.json


What does "bunting" mean in the date entries?


Bunting just means decorations, the value is true when the government recommends decorating for the holiday. It's reserved for celebrations, so events like the queens funeral have it set to false.


Isn’t there black bunting?


Personally this (along with things like address lookup) are things that I consider a government should always provide. Consistent data.


Stuff like this is often officially communicated through some kind of government newsletter. Other times it's just custom and doesn't have a formal notification.


You do what you can, and then insure the remaining risk away.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: