Skip to main content
This revision made January 05, 2013 23:16, by Anatole


JSR 354 - Requirements


Functional Requirements


  • Ability to format currencies as per the local market convention. For those unfamiliar with this take a look at something like Region and Language -> Customize Format in Windows 7 for the complete list of number grouping conventions that can be used for monetary values. The new Money type should have the ability to format itself to the standard convention for the Currency or a user specified format.
  • Ability to convert Money value to a String representation (i.e. Five hundred dollars and fifty three cents – useful when producing statements and printing cheques in financial applications. SJC - this is a hard requirement in I18N terms, and something that could be added on top of the main API and separate to the JSR.
  • Currencies shall store their symbols and symbol placement convention. For example: GBP 541.53 should be able to format itself as Five hundred and forty one pounds fifty three pence, but also as £ 541.53p. Put another way currency should also hold its currency symbols, placement rules (many currencies use suffix notation) and probably the natural names for the currency components, so “pounds” and “pence” in the example above.
  • Ability to apply currency rounding and precision conventions (not all currencies and markets use the round up on >=5 and round down <5 convention that we’re used to in the UK and US). These are typically defined as a market convention for a given currency.
  • I’d like us to at least discuss some simplistic support for non-decimal currencies – many financial products are still quoted using fractional prices (as well as decimal) so it would at least make sense for us to be able to represent such prices as naturally as possible.
Difference compared to previous revision
<span><span style="text-decoration:line-through;color:red">'''</span><span style="text-decoration:underline;color:green">=<img align="right" src="http://asset-1.java.net/attachments/images/project/javamoney.png?20121214.f926c51"/> <br/>JSR 354 - Requirements<br/><br/><br/> ==</span>Functional Requirements<span style="text-decoration:line-through;color:red">'''</span> <span style="text-decoration:line-through;color:red">1.</span>Functional Requirements <span style="text-decoration:underline;color:green">*</span> Ability to format currencies as per the local market convention. For those unfamiliar with this take a look at something like <span style="text-decoration:underline;color:green">''</span>Region and Language -> Customize Format<span style="text-decoration:underline;color:green">''</span> Ability to format currencies as per the local market convention. For those unfamiliar with this take a look at something like Region and Language -> Customize Format in Windows 7 for the complete list of number grouping conventions that can be used for monetary values. The new Money type should have the ability to format itself to the standard convention for the Currency or a user specified format. <span style="text-decoration:line-through;color:red"> 2.</span> in Windows 7 for the complete list of number grouping conventions that can be used for monetary values. The new Money type should have the ability to format itself to the standard convention for the Currency or a user specified format. <span style="text-decoration:underline;color:green">*</span> Ability to convert Money value to a String representation (i.e. <span style="text-decoration:line-through;color:red">“</span><span style="text-decoration:underline;color:green"><code></span>Five hundred dollars and fifty three cents<span style="text-decoration:line-through;color:red">”</span><span style="text-decoration:underline;color:green"></code></span> – useful when producing statements and printing cheques in financial applications.<span style="text-decoration:line-through;color:red"> </span><span style="text-decoration:underline;color:green"> </span>SJC - this is a hard requirement in I18N terms, and something that could be added on top of the main API and separate to the JSR<span style="text-decoration:underline;color:green">.</span>SJC - this is a hard requirement in I18N terms, and something that could be added on top of the main API and separate to the JSR <span style="text-decoration:line-through;color:red"> </span> <span style="text-decoration:underline;color:green">* </span>Currencies shall store their symbols and symbol placement convention. For example:<span style="text-decoration:underline;color:green"> </span>Currencies shall store their symbols and symbol placement convention. For example:<<span style="text-decoration:line-through;color:red">br/> M</span><<span style="text-decoration:underline;color:green">c</span>o<span style="text-decoration:line-through;color:red">n</span><span style="text-decoration:underline;color:green">d</span>e<span style="text-decoration:line-through;color:red">y:</span><span style="text-decoration:underline;color:green">>GBP</span> 541.53<<span style="text-decoration:line-through;color:red">br</span>/<span style="text-decoration:line-through;color:red">> Curren</span>c<span style="text-decoration:line-through;color:red">y: GBP<br/</span> 541.53</c<span style="text-decoration:underline;color:green">ode</span>><span style="text-decoration:line-through;color:red"> <br/> S</span><span style="text-decoration:underline;color:green"> s</span>hould be able to format itself as<span style="text-decoration:line-through;color:red">:</span><span style="text-decoration:underline;color:green"> </span><<span style="text-decoration:line-through;color:red">br/</span><span style="text-decoration:underline;color:green">code</span>><span style="text-decoration:line-through;color:red"> “</span>Five hundred and forty one pounds fifty three pence<span style="text-decoration:line-through;color:red">”</span><<span style="text-decoration:line-through;color:red">br</span>>Five hundred and forty one pounds fifty three pence</<span style="text-decoration:underline;color:green">code</span>/><span style="text-decoration:line-through;color:red"> <</span>><span style="text-decoration:underline;color:green">, </span>b<span style="text-decoration:line-through;color:red">r/> B</span>ut also as<span style="text-decoration:line-through;color:red">:</span>but also as<span style="text-decoration:underline;color:green"> </span><<span style="text-decoration:line-through;color:red">br/</span><span style="text-decoration:underline;color:green">code</span>><span style="text-decoration:line-through;color:red"> <br/> </span>£ 541.53p<<span style="text-decoration:line-through;color:red">br</span>>£ 541.53p</<span style="text-decoration:underline;color:green">code</span>/><span style="text-decoration:line-through;color:red"> </span>><span style="text-decoration:underline;color:green">. </span>Put another way currency should also hold its currency symbols, placement rules (many currencies use suffix notation) and probably the natural names for the currency components, so “pounds” and “pence” in the example above. <span style="text-decoration:line-through;color:red"> 3.</span><span style="text-decoration:underline;color:green">*</span> Ability to apply currency rounding and precision conventions (not all currencies and markets use the round up on >=5 and round down <5 convention that we’re used to in the UK and US). These are typically defined as a market convention for a given currency. <span style="text-decoration:line-through;color:red"> 4.</span><span style="text-decoration:underline;color:green">*</span> I’d like us to at least discuss some simplistic support for non-decimal currencies – many financial products are still quoted using fractional prices (as well as decimal) so it would at least make sense for us to be able to represent such prices as naturally as possible.<span style="text-decoration:line-through;color:red"> </span><span>
 
 
Close
loading
Please Confirm
Close