On Dec 22, 2008, at 11:38 AM, mmalc Crawford wrote:
On Dec 22, 2008, at 9:22 AM, Nathan Vander Wilt wrote:
[Good advice, except:]
NSCalendar can handle overflow, so you can have an NSDateComponent
that says something like Year:2008 Month:1 Days:364 and you will
get the right date from components.
You should not rely on this behaviour.
Oh dear, thanks for noticing that! I should have double-checked: Only -
dateByAddingComponents:toDate:options: is documented to handle
"overflow". Not -dateFromComponents:, which is actually documented to
return nil for out-of-range values. Sorry about that.
-nvw
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com