• 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: NSNumberFormatter vs NumberFormat
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNumberFormatter vs NumberFormat


  • Subject: Re: NSNumberFormatter vs NumberFormat
  • From: "Mr. Pierre Frisch" <email@hidden>
  • Date: Sat, 9 Feb 2008 09:48:52 -0800

Georg,

I hear you but have you look at how the NS*Formatter are implemented? They are a thin veneer on top of the Java format. There is nothing you can do with those formatter you cannot do with the Java formats, but there are quite a few things you can do with the Java format that do not work correctly with the NS*Formatter localization being one thing. In the work I have done before being at Apple I have stop using the NS*Formatter a very long time ago.

I am not sure I understand what your point is, I am not aware of the Java format definition to have changed for a very long time. I am not talking of Date / Time handling in general but specifically of formats.

Pierre
--
Pierre Frisch
email@hidden


On Feb 9, 2008, at 9:21, Georg Tuparev wrote:

Pierre,

I watched the NSTimestampFormatter discussion initially with amazement that changed to annoyance. Now I have to voice my frustration!

The fact that Java implements Time and Number formatters does not mean that they are usable. Not that WO Time&Date support is fantastic, but at least formatters worked (more or less).

The right thing (tm) Apple should do is to enhance NS* classes to reflect the current stage of the technology, not to drop them. Of course to drop them means less work for you, but this will have severe implication in the future. I can speak for us only, but I am sure others share my opinion. If WO drops NS*Formatter classes we have to write our own and they will be guaranteed not based on the standard Java s***! But then one day in the future they will be new standards, committees, protocols ... And in 5 years all formatters will look and behave in a different way, and this is bad for the users of our application.

If Apple cannot write working Time & Date support, you could hire us to do it. After working on astronomy projects that must work everywhere on earth, moon, Mars, on any satellite, and for the Klingon empire, I believe we know everything about time... standard, local, universal, galactic, ecliptic, barycentric, ... you name it.

<rant>
Is anyone out there who is happy with the current Java/WO Time and Date handling?
</rant>


cheers

gt

On Feb 8, 2008, at 6:00 PM, Mr. Pierre Frisch wrote:

There was a long discussion about the NSTimestampFormatter not long ago. I would put the NSNumberFormatter in the same bag. Duplicate API, should be deprecated. I did not do it as it was was working for most people but I don't see the point of fixing bugs there when the Java one work perfectly fine.

Pierre
--
Pierre Frisch
email@hidden


On Feb 8, 2008, at 8:43, Michael Halliday wrote:

Hey list!!

Just a question regarding the use of NSNumberFormatter vs NumberFormat.

We're working on localizing one of our app for use in multiple countries. We are dealing with decimal and currency formats in a variety of locales. Just wondering what everyone else uses and the pros and cons of using NumberFormat over NSNumberFormatter or Wonders ERXNumberFormatter.

If we have a format string such as "$#,##0.00" NSNumberFormatter doesn't correctly localize the currency symbol, it does substitute the correct symbol, but not necessarily in the right position. IE for United States, France and Germay

US            ---> $1,100.59
France     ---> €1 100,59  Should be --> 1 100,59 €
Germany ---> €1.100,59  Should be --> 1.110,59 €

If I use the NumberFormat.getCurrencyInstance( LOCALE ) it formats the numbers correctly. NSNumberFormat doesn't provide a "currencyInstance".

We could use NumberFormat throughout our app and not use NSNumberFormatter at all ... but I'm just wondering what other functionality we would lose ... does NSNumberFormatter do anything "special" that NumberFormat does not.

Also, does anyone know if NSNumberFormatter will suffer the same depreciated fate the NSTimestampFormatter has? I guess that's a question for Pierre.

Any help or ideas would be greatly appreciated! I just don't want to go down one path and find that I should have taken another :).

Thanks!!!


Georg Tuparev Tuparev Technologies Klipper 13 1186 VR Amstelveen The Netherlands Mobile: +31-6-55798196


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >NSNumberFormatter vs NumberFormat (From: Michael Halliday <email@hidden>)
 >Re: NSNumberFormatter vs NumberFormat (From: "Mr. Pierre Frisch" <email@hidden>)
 >Re: NSNumberFormatter vs NumberFormat (From: Georg Tuparev <email@hidden>)

  • Prev by Date: Re: NSNumberFormatter vs NumberFormat
  • Next by Date: Re: Store (large) images inside or outside database?
  • Previous by thread: Re: NSNumberFormatter vs NumberFormat
  • Next by thread: Re: NSNumberFormatter vs NumberFormat
  • Index(es):
    • Date
    • Thread