• 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
user defaults - NSDateTimeOrdering string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

user defaults - NSDateTimeOrdering string


  • Subject: user defaults - NSDateTimeOrdering string
  • From: Ben Dougall <email@hidden>
  • Date: Wed, 23 Feb 2005 14:44:33 +0000

in the documentation for NSUserDefault's constant NSDateTimeOrdering it says:

A string that specifies how to use ambiguous numbers in date strings. Specify this value as a permutation of the letters M (month), D (day), ...

the 'specify' part implies that you have to set this value yourself? (which surprises me if that is the case). does, or should the string get based on something appropriate automatically? seemingly not because:

[[NSUserDefaults standardUserDefaults] objectForKey:NSDateTimeOrdering]
returns:
MDYH
for me, and in my international date prefs i have both long and short date formats set so the day number comes first, before the month, but i still get the above result, not DMYH as i expected. what's that string's order based on? or is MDYH the blanket default -- its not based on anything, always MDYH unless manually changed?


is NSDateTimeOrdering something your code needs to set before using, so therefore set it appropriately and manually based on the the results from examining the user's date settings maybe?

thanks, ben

_______________________________________________
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: user defaults - NSDateTimeOrdering string
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: Re: Connecting NSOutlineView to NSTextView
  • Next by Date: Re: Why is copyWithZone: being called?
  • Previous by thread: Re: Help. How to use the argument list passed in NSApplicationMain?
  • Next by thread: Re: user defaults - NSDateTimeOrdering string
  • Index(es):
    • Date
    • Thread