• 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 NSDateFormatter strings from the user's preferences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the NSDateFormatter strings from the user's preferences


  • Subject: Re: Getting the NSDateFormatter strings from the user's preferences
  • From: "Sean McBride" <email@hidden>
  • Date: Fri, 20 May 2005 14:29:52 -0400
  • Organization: Rogue Research

On 2005-05-20 11:01, James Bucanek said:

>After some experimentation, I have found that NSShortDateFormatString
>corresponds to the Short date defined by the user in the International
>Prefeence Pane.

Agreed.

>However, NSDateFormatString (which I was more interested
>in) does not correspond to any of the formats defined by the user.

It does. :)  At least for me. :)

>As an experiment, I edited my date formats in System Preferences to all
>be "military" style dates (01-May-2005).  I then restarted my computer
>(to avoid any caching) and ran my application again.
>
>The value returned for NSShortDateFormatString changed from '%1m/%e/%y'
>to '%e-%m-%y' as per my preference.  But the value for NSDateFormatString
>still returns '%A, %B %e, %Y %1I:%M:%S %p %Z', which doesn't match
>anything the I defined.

Are you sure you're looking at NSDateFormatString and not
NSTimeDateFormatString? The former should never have time info in it,
which it seems to for you.

In sys prefs, in the long date section, I just changed all the ', ' to '*
' and NSDateFormatString gives me the right string, ie no more commas,
but asterisks instead.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
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

References: 
 >Re: Getting the NSDateFormatter strings from the user's preferences (From: "Sean McBride" <email@hidden>)
 >Re: Getting the NSDateFormatter strings from the user's preferences (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: FSMountServerVolumeSync, AFP volumes and Tiger
  • Next by Date: Re: International date formatting
  • Previous by thread: Re: Getting the NSDateFormatter strings from the user's preferences
  • Next by thread: Re: Getting the NSDateFormatter strings from the user's preferences
  • Index(es):
    • Date
    • Thread