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 15:04:13 +0200

That would be closest to what JSR 310 has in places like http://download.java.net/jdk8/docs/api/java/time/temporal/ChronoUnit.html based on TemporalUnit which can be implemented differently.

A TemporalAmount of "10 days, 5 minutes, 30 milliseconds  therefore has a set of 3 TemporalUnit items DAYS, MINUTES and MILLIS.

Calling the enum standard method values() gives you all possible TemporalUnits for such implementation.

Not sure, if we'd want to do that as enum, after all currency data so far comes from a binary file called currency.data in the JRE, don't think there are significant hard coded definitions other than that, so adding new currency data to both standalone and JDK/JRE level implementations should be compatible with this kind of information, or we'll have to define and provide an alternate data source for all currencies to hold that.

Regards,
Werner

On Tue, Apr 16, 2013 at 2:41 PM, Simon Martinelli <simon.martinelli@...> wrote:
Hi all,

In commerce applications we often need to know what denominations and fractions a currency unit has. Like in CHF denonminations (1000, 200, 100, 50, 20, 10) and fractions (50, 20, 10, 5) 

We need that to do some validation on the cash desk. To check if the given amount that the cashier enters is valid.

Do we plan to implement such things?

Regard, Simon



[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