Skip to main content

[JSR-354] Re: Denominations and Fractions

  • From: Werner Keil <werner.keil@...>
  • To: jcurrency_mail@...
  • Subject: [JSR-354] Re: Denominations and Fractions
  • Date: Tue, 16 Apr 2013 16:07:13 +0200

Simon/Anatole,

Fully agree. If we keep MinorPart or a similar functionality in the core, at least the commonly accepted or "legal tender" fraction should be supported to the same extent as the actual CurrencyUnit (symbol plus DisplayName, and as seen for CH where available for multiple languages) 

Everything else I'd consider optional and it may well be of great value to CLDC/ME Embedded based profiles, e.g. smart fuel stations or money changing machines, or some server-side accounting apps, but it should not be in the JDK or Spec.

Werner

On Tue, Apr 16, 2013 at 4:02 PM, Simon Martinelli <simon.martinelli@...> wrote:
Hi Anatole,

Thanks for the clarification.
I completely agree with all three points

Simon

Simon Martinelli
--
Moosentli 7
CH-3235 Erlach

+41 32 544 88 80
simon@...


On Tue, Apr 16, 2013 at 3:54 PM, Tresch Anatole (KFSC 225) <anatole.tresch@...> wrote:

I see different concerns here:

1.       Evaluating a MinorPart in a mathematical sense, by just stripping away the major part, but keeping full scale. This is what the current MinorPart function does. It is not specific to the currency involved.

2.       Evaluating a MinorPart, depending on the currency involved requires rounding, and therefore should be solved accordingly. Since rounding rules are completely different depending on use cases, currency, formatting etc. only relatively simple roundings can be included into the JSR’s reference implementation. With appropriate data available we probably can enrich the current MoneyRounding implementations, that we can also honor the minimal increment of minor units per currency. But I think all beyond will not be feasible to be provided by our JSR (it can be loaded by some online data providers, which definitively exceeds our scope here).

3.       Knowing what kind of coins and notes are available, e.g. for calculating the coins/notes to be returned by some machine, is a complete different story. But also there, I think it is not possible to provide such data for all currencies worldwide. We can think of building an API to model this aspect, but I think, it is not feasible to provide the effective information as part of our JSR.

 

Summarizing

·         Part 1 is part of the core.

·         Part 2 should not be part of the core, nor the standalone part. The mechanism to be used (MonetaryFunction) already is in place, whereas the data to effectively provide such a functionality worldwide may be a problem to manage, so it should be delegated to the application developers and not be part of the JSR.

·         Part 3 is for me a more general aspect, which could be added as API to standalone or extension part, but definitively not on the platform/core part. Nevertheless the data provided must be delegated to the users of the APIs, at least for most cases.

 

Anatole

 

Anatole Tresch

CREDIT SUISSE AG

Information Technology | Java Core Framework & Support, KSXK 23

Zollstrasse 20/36 | 8070 Zürich | Switzerland

Phone +41 44 334 03 89

anatole.tresch@... | www.credit-suisse.com

 

From: Werner Keil [mailto:werner.keil@...]
Sent: Tuesday, April 16, 2013 15:33
To: jcurrency_mail@...
Subject: [JSR-354] Re: Denominations and Fractions

 

The Swiss Frank only has one subunit 1/100, but I love the name "Rap" in Romansh





[JSR-354] Denominations and Fractions

Simon Martinelli 04/16/2013

[JSR-354] Re: Denominations and Fractions

Tresch Anatole (KFSC 225) 04/16/2013

[JSR-354] Re: Denominations and Fractions

Werner Keil 04/16/2013

[JSR-354] Re: Denominations and Fractions

Werner Keil 04/16/2013

[JSR-354] Re: Denominations and Fractions

Werner Keil 04/16/2013

[JSR-354] Re: Denominations and Fractions

Werner Keil 04/16/2013

[JSR-354] Re: Denominations and Fractions

Tresch Anatole (KFSC 225) 04/16/2013

[JSR-354] Re: Denominations and Fractions

Simon Martinelli 04/16/2013

[JSR-354] Re: Denominations and Fractions

Werner Keil 04/16/2013

[JSR-354] Re: Denominations and Fractions

Werner Keil 04/16/2013

[JSR-354] Re: Denominations and Fractions

Werner Keil 04/16/2013

[JSR-354] Re: Denominations and Fractions

Werner Keil 04/16/2013
 
 
Close
loading
Please Confirm
Close