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

Back-to-front date formatting


  • Subject: Back-to-front date formatting
  • From: Jeremy Dronfield <email@hidden>
  • Date: Fri, 16 Jan 2004 22:16:53 +0000

I've got an NSCalendarDate initialised and formatted as follows:

yearDate = [[NSCalendarDate alloc] initWithString:[newEntryField stringValue] calendarFormat:@"%A %e %B\n%Y"];

This gives me a result,
"Friday 16 January
2004"

What I *want*, though, is,
"2004
Friday 16 January"

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?

-Jeremy

========================================
email@hidden

theLocustFarm.net:
- fractious fiction at http://freespace.virgin.net/jeremy.dronfield
========================================
_______________________________________________
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: Nicholas Riley <email@hidden>
  • Prev by Date: Re: Optimizing Screensaver
  • Next by Date: default memory zone size restriction?
  • Previous by thread: Re: Optimizing Screensaver
  • Next by thread: Re: Back-to-front date formatting
  • Index(es):
    • Date
    • Thread