Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I calculate holidays?

Tags:

c#

.net

datetime

I have an application that registers when people are sick and sends a notification to a manager at a certain number of workdays after this event.

I can use the properties of DateTime to skip weekends but how do I skip holidays?

I've read somewhere that church holidays are calculated from easter. But how? And how do I find easter in the first place?

like image 690
transporter_room_3 Avatar asked Oct 12 '25 14:10

transporter_room_3


1 Answers

Maybe a little too late but you can use my library Nager.Date. With my library you can calculate holidays for over 100 different countries. There is also a nuget package available.

like image 167
Tino Hager Avatar answered Oct 14 '25 07:10

Tino Hager



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!