• 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: Formatting numbers, currency, and dates based on locale
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Formatting numbers, currency, and dates based on locale


  • Subject: Re: Formatting numbers, currency, and dates based on locale
  • From: Ondra Cada <email@hidden>
  • Date: Sun, 5 May 2002 20:52:33 +0200

On Sunday, May 5, 2002, at 08:23 , Isaac Sherman wrote:

In OS X's System Prefs, the International panel contains the locale settings
for numbers, dates, and time. Does Cocoa have a formatting routine for
numbers and dates that will take into account these various locale settings?

I would like to display numbers, currency, and dates formatted in accordance
with the machine's International settings.

I'd look at NSUserDefaults. It looks like it does exactly what you're
looking for.

Well, yes and no. Via NSUserDefaults one can get all the values and settings; Cocoa though supports many localizable things directly. Just search the documentation: I bet there are some services in NSCalendarDate,
also NSNumberFormatter and NSDateFormatter IIRC use the locale information extensively.

(Caveat: I haven't checked any of them myself though: living in country which was never explicitly supported by NeXTStep nor Mac OS X I've always done all formatting myself, so I can't say how properly it works).
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Formatting numbers, currency, and dates based on locale
      • From: Charles Srstka <email@hidden>
References: 
 >Re: Formatting numbers, currency, and dates based on locale (From: Isaac Sherman <email@hidden>)

  • Prev by Date: Drag & Drop: Finder to TableView
  • Next by Date: NSDrawer
  • Previous by thread: Re: Formatting numbers, currency, and dates based on locale
  • Next by thread: Re: Formatting numbers, currency, and dates based on locale
  • Index(es):
    • Date
    • Thread