• 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: arbitrary date formats based on user prefs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: arbitrary date formats based on user prefs


  • Subject: Re: arbitrary date formats based on user prefs
  • From: Ben Dougall <email@hidden>
  • Date: Wed, 22 Dec 2004 14:00:55 +0000


On Wednesday, December 22, 2004, at 12:46 am, mmalcolm crawford wrote:


On Dec 21, 2004, at 3:33 PM, Ben Dougall wrote:

how can i display particular date elements in the style of the user's prefs?

<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Classes/NSUserDefaults.html>
See, for example, NSDateFormatString

sorry to be a thicky but i can't see how that'd get various sets of date elements -- i'm trying to work out how to get a preferred format for different combinations of date elements. how can i get the preferred format for, for example, the full day name(%A) and the day number of month(%e) and the full month name(%B) as the user would want to see those date elements? is there a way to say "what's the preferred format for this combination of elements: %e %B %A ?" (or other combinations) and get back the format "%A, %e %B" or "%A, %B %e" or whatever depending on how the user would like it -- based on the international date pref settings.


or, if not, are there labels for various combinations of date elements which can be used to get the preferred format of the already established various combinations? (i can see there's NSShortDateFormatString "31/10/01" and NSShortTimeDateFormatString "31-Jan-01 1:30 PM." and NSTimeDateFormatString "Sunday, January 01, 2001 23:00:00 Pacific Standard Time." but am hoping for more)

at the moment i do want to find out the preferred format for the %e %B %A date elements, but am asking a more general version of the question because i can see myself wanting other combinations later. but i would be happy to find a way to format just %e %B %A according to prefs now. any ideas?

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: arbitrary date formats based on user prefs
      • From: mmalcolm crawford <email@hidden>
References: 
 >Re: arbitrary date formats based on user prefs (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: Renaming files?
  • Next by Date: Re: how to write programatically greek letters to an NSTextField?
  • Previous by thread: Re: arbitrary date formats based on user prefs
  • Next by thread: Re: arbitrary date formats based on user prefs
  • Index(es):
    • Date
    • Thread