HI,
I was wundering, is there a class, module, script or whatever, that i could use to check if a specific date is in a holiday. ( by holiday i mean not X-mas or eachter, but xmas vacation or summer vacation etc. 0. I already finded it for celibration days like x-mas new years eve etc but now i need it olso for the real school holidays. I already made an excel file, that contains all the real holidays. However that still needs to be updated every year. SO i thought maybe there is a way to calculate or download it every year.
thnx

Riddhi ValechaRank #794 · 2.9K reputationPosted Feb 24, 2016, 10:26 AM EST
ali tuncerRank #1,499 · 1.1K reputationPosted Feb 24, 2016, 3:42 PM EST
You need to find out how they decide summer vacations every year, if it is same every year(like it starts first friday of june ends first monday of September), you can do it..
Riddhi ValechaRank #794 · 2.9K reputationPosted Feb 24, 2016, 7:45 PM EST
protected DateTime getFirstWednesdayOfMonth(DateTime seedDate) { DateTime wed1 = new DateTime(seedDate.Year, seedDate.Month, 1); //1st Wednesday can start on the 1st of the month while (wed1.DayOfWeek != DayOfWeek.Wednesday) { wed1 = wed1.AddDays(1); } return wed1; } protected DateTime getThirdWednesdayOfMonth(DateTime seedDate) { DateTime wed3 = new DateTime(seedDate.Year, seedDate.Month, 15); //3rd Wednesday cannot start prior to the 15th of the month while (wed3.DayOfWeek != DayOfWeek.Wednesday) { wed3 = wed3.AddDays(1); } return wed3; } protected void Button1_Click(object sender, EventArgs e) { DateTime Now = DateTime.Today; DateTime wed1 = getFirstWednesdayOfMonth(Now); DateTime wed3 = getThirdWednesdayOfMonth(Now); if (Now lblDate.Text = wed1.ToString(); } else if (Now lblDate.Text = wed3.ToString(); } }Cassie ModRank #3,821 · 387 reputationPosted Feb 24, 2016, 11:12 PM EST