• 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: Back-to-front date formatting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Back-to-front date formatting


  • Subject: Re: Back-to-front date formatting
  • From: Nicholas Riley <email@hidden>
  • Date: Fri, 16 Jan 2004 16:48:36 -0600
  • Mail-followup-to: Jeremy Dronfield <email@hidden>, email@hidden

On Fri, Jan 16, 2004 at 10:16:53PM +0000, Jeremy Dronfield wrote:
> The trouble is, -initWithString:calendarFormat: won't accept the year
> at the beginning (it chokes and spits out a nil value). The same
> happens if I try to extract the year with @"%Y". Does anyone know a way
> around this?

Perhaps this is a bug in Mac OS X 10.2.x? Date/time formatting was quite
flaky in 10.2 and earlier, and was rewritten in 10.3, where your
example works fine:

> NSCalendarDate alloc initWithString: '2004\nFriday 16 January' calendarFormat: '%Y\n%A %e %b'
2004
Friday 16 Jan

I tried it with several other dates and had no problems.

If you are using 10.3, make sure the string actually contains what you
think it does...

--
=Nicholas Riley <email@hidden> | <http://www.uiuc.edu/ph/www/njriley>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Back-to-front date formatting
      • From: Jeremy Dronfield <email@hidden>
References: 
 >Back-to-front date formatting (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: [Fixed] NSArrayController Funkyness
  • Next by Date: Re: Optimizing Screensaver
  • Previous by thread: Back-to-front date formatting
  • Next by thread: Re: Back-to-front date formatting
  • Index(es):
    • Date
    • Thread