• 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: NSDateFormatter weekdaySymbols
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDateFormatter weekdaySymbols


  • Subject: Re: NSDateFormatter weekdaySymbols
  • From: Ricky Sharp <email@hidden>
  • Date: Mon, 2 Apr 2007 20:45:38 -0500


On Apr 2, 2007, at 7:46 PM, Nicholas Meyer wrote:

Is there a way to automatically populate weekdaySymbols in an NSDateFormatter instance?

If I create a new DateFormatter and call weekdaySymbols, the returned array is empty. Explicitly setting the locale and formatting styles yields no different result.

What's your exact code?

The following works well for me (weekdaySymbols is for 10.4 and later; I ran this on 10.4.9):

NSDateFormatter* theDateFormatter = [[[NSDateFormatter alloc] init] autorelease];

[theDateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
NSLog (@"%@", [theDateFormatter weekdaySymbols]);

[theDateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"fr_FR"]];
NSLog (@"%@", [theDateFormatter weekdaySymbols]);



output:

(Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday)
(dimanche, lundi, mardi, mercredi, jeudi, vendredi, samedi)

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.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: NSDateFormatter weekdaySymbols
      • From: Nicholas Meyer <email@hidden>
References: 
 >NSDateFormatter weekdaySymbols (From: Nicholas Meyer <email@hidden>)

  • Prev by Date: Re: -attributeKeys and Core Data
  • Next by Date: Re: Deselecting an NSButtonCell?
  • Previous by thread: NSDateFormatter weekdaySymbols
  • Next by thread: Re: NSDateFormatter weekdaySymbols
  • Index(es):
    • Date
    • Thread