• 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: How to get default date format?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get default date format?


  • Subject: Re: How to get default date format?
  • From: Daniel Morrow <email@hidden>
  • Date: Thu, 7 Oct 2004 09:40:19 -0400

never mind, found it.

NSString* formatStr = [[NSUserDefaults standardUserDefaults] objectForKey:NSDateFormatString];

-Dan.
On Oct 7, 2004, at 9:17 AM, Daniel Morrow wrote:

Dear cocoa-dev list,

I have a date string that get in this form "2004-10-07"

which I'd like to turn into a date, and then return the string

"Thursday, October 10, 2004"

However, I don't want to hard-code the format of the string. I want to ask the system what the user's preferred long-date format is, and display it like that. You know, the format that the user chooses in the "International" system prefs.

Thanks,
-Dan.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: How to get default date format?
      • From: "Sean McBride" <email@hidden>
References: 
 >How to get default date format? (From: Daniel Morrow <email@hidden>)

  • Prev by Date: Re: Calling an Obj-C method from a C++ class, how?
  • Next by Date: Problems Subclassing NSDateFormatter in IB
  • Previous by thread: How to get default date format?
  • Next by thread: Re: How to get default date format?
  • Index(es):
    • Date
    • Thread