• I never liked solutions with precomputed data, but it seems that performance should take priority over my taste 🙂

    How do you fill in the calendar table?

    Fill it once in advance for the next 200 years and then update single entries as changes happen?

    Coz something like that is about the only way it will work 100% right, that is the only practical way to guarantee to your app that it will not try to access a date that is "out of range".

    Even that is no big deal of course, since 200 years is about 70K records. The performance will probably be mind-blasting compared to the "calculate every time" approach we use use right now. Plus it allows you to directly switch a non-working day to a working day in no time and that's cool 🙂