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 (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 [EMAIL PROTECTED]

Reply via email to