Re: NSDateComponents question
Re: NSDateComponents question
- Subject: Re: NSDateComponents question
- From: mmalc crawford <email@hidden>
- Date: Tue, 01 Jul 2008 09:26:21 -0700
Hi Chris,
On Jul 1, 2008, at 9:10 AM, Christopher Kane wrote:
The more subtle and serious issue is that Sunday in the current week
might be in the previous Month (so, Day < Weekday), or even previous
Year, so setting the Day to a negative value and keeping the Month
and Year the same will have ... "who knows what effect".
My apologies; I did do some testing and found that the resultant date
was always correct.
Could you elaborate on what circumstances this might not be correct?
A more robust approach would be to just get the weekday value:
Ironically that's effectively what I first suggested (with the
addendum of the normalisation).
mmalc
_______________________________________________
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