• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting the last date of the month?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Getting the last date of the month?
      • From: Deborah Goldsmith <email@hidden>
References: 
 >Getting the last date of the month? (From: Nick Zitzmann <email@hidden>)
 >Re: Getting the last date of the month? (From: Greg Titus <email@hidden>)
 >Re: Getting the last date of the month? (From: "Jim Thomason" <email@hidden>)
 >Re: Getting the last date of the month? (From: Deborah Goldsmith <email@hidden>)
 >Re: Getting the last date of the month? (From: Nick Zitzmann <email@hidden>)
 >Re: Getting the last date of the month? (From: Deborah Goldsmith <email@hidden>)

  • Prev by Date: Re: Is there a way to re-compile a framework for Intel Mac?
  • Next by Date: Re: Is there a way to re-compile a framework for Intel Mac?
  • Previous by thread: Re: Getting the last date of the month?
  • Next by thread: Re: Getting the last date of the month?
  • Index(es):
    • Date
    • Thread