Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculate May 24 celebration date
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Calculate May 24 celebration date
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01309184
Message ID:
01309184
Views:
58
I am wondering how to calculate the May 24th weekend here in Ontario?
I thought it was the Monday closest to the 24th. However this is obviously incorrect as this year it is being celebrated on the 19th, which is the closest Monday before the date, but not the closest Monday...(the 24th is a Saturday this year, which makes the closest Monday the 26th)

Now if I look st the next 4 years,
2009 the 24th is Sunday, so would it be celebrated on the 25th or like this year on the 18th?
2010 the 24th is Monday, so that's when it would be celebrated
2011 the 24th is a Tuesday so is it celebrated on the prior Monday?
2012 the 24th is a Thursday, so is it celebrated on the prior Monday?

So what would be the rule to write in code to calculate this date. Obviously it is not the 4th Monday or 3rd Monday or anything simple like that.

Help!
Mike
Next
Reply
Map
View

Click here to load this message in the networking platform