Re: Getting the last date of the month?
Re: Getting the last date of the month?
- Subject: Re: Getting the last date of the month?
- From: Nick Zitzmann <email@hidden>
- Date: Fri, 23 Mar 2007 18:13:28 -0600
On Mar 23, 2007, at 5:57 PM, Deborah Goldsmith wrote:
That sounds like a bug to me. I would suggest filing it in Radar.
Actually, it's working as expected. -rangeOfUnit:inUnit:forDate:
returns a unit in a unit, and if you try using it to get the number
of days in the month of October 1582, it returns the correct value
(21 days, because Pope Gregory deleted 10 days from the calendar that
month). But the last date in October 1582 is the 31st, not the 21st,
so -rangeOfUnit:inUnit:forDate: is working as expected, but it only
works for getting the last date of the month if we can assume the
last day in the month is equal to the number of days in the month. In
this case, we can't, so I had to find another method.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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