Anybody already know how to determine, given a particular year, the third Monday in January, or other similar "relative" dates?
I'm looking to built a method along the lines of:
And when called for this year:
would return 20.
In the meantime, I am going to play around with NSDateComponents etc. to see what I can figure out, but if someone has a quick answer, that would be great!
I'm looking to built a method along the lines of:
Code:
- (int)getMLKDayForYear:(int)year;
And when called for this year:
Code:
[self getMLKDayForYear:2014];
would return 20.
In the meantime, I am going to play around with NSDateComponents etc. to see what I can figure out, but if someone has a quick answer, that would be great!