Finding a relative date
Finding a relative date
- Subject: Finding a relative date
- From: Randall Meadows <email@hidden>
- Date: Mon, 25 Feb 2008 12:27:09 -0700
Given a specific NSDate, I need to be able to find, say, the Sunday
before that date, or the Saturday after that date. I was hoping to be
able to use +dateWithNaturalLanguage with something like "Sunday
before [myDate description]", but that just returns myDate.
I know I can brute-force it, by figuring out the myDate's day, then
walking backward and/or forward, but is there an easier way? One more
tried and true, less error-prone, that's calendar-savvy (not that I'm
going to need to go as far back as Oct 1582...)?
Thanks!
randy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden