currency-issues-fr

From Microformats Wiki
Jump to navigation Jump to search

Currency - Les problématiques

Unité et Valeur

Exemple

<span class="money">
  <span class="amount">99</span>
  <abbr class="unit">¢</abbr>
  <abbr class="currency" title="USD"></abbr>
</span>
<span class="money">
  <span class="amount">1.232</span>
  <abbr class="unit">bill.</abbr>
  <abbr class="currency" title="EUR">Euro</abbr>
</span>

Problème

La base pour cette donnée (montant) est la devise - USD (U.S. Dollar). Mais le montant n'est pas de 99 Dollar, il est de 0.99 Dollar. L'unité est le ¢ (U.S. Cent). Alors que la valeur currency est définie par ISO 4217, il n'existe pas de liste pour une devise et ses facteurs correspondants pour la base currency. Par conséquent, ce serait problématique de transférer automatiquement ces valeurs.

Un problème similaire est l'utilisation de billions comme 1.232 Bill. Euro. Mais le montant n'est pas de 1.232.000.000 Euros comme pourrait le penser un lecteur anglais, en allemand cela signifie 1.232.000.000.000 Euros.

Alternative 1

Providing the amount corresponding to the currency:

<span class="money">
  <abbr class="amount" title="0.99">99</abbr>
  <abbr class="unit">¢</abbr>
  <abbr class="currency" title="USD"></abbr>
</span>
<span class="money">
  <abbr class="amount" title="1232000000000">1.232</abbr>
  <abbr class="unit">bill.</abbr>
  <abbr class="currency" title="EUR">Euro</abbr>
</span>

Alternative 2

Providing the unit-factor corresponding to the currency base:

<span class="money">
  <span class="amount">99</span>
  <abbr class="unit" title="0.01">¢</abbr>
  <abbr class="currency" title="USD"></abbr>
</span>
  <span class="money">
  <span class="amount">1.232</span>
  <abbr class="unit" title="1000000000000">bill.</abbr>
  <abbr class="currency" title="EUR">Euro</abbr>
</span>

Alternative 3

Providing the unit-factor corresponding to the currency base in an own element "scale" (I will suggest this also to the measurement format discussion.) Therefore the unit can be used for the currency itself - then it is more in line with a general measurement format.

<span class="money">
  <span class="amount">99</span>
  <abbr class="scale" title="0.01">¢</abbr>
  <abbr class="unit" title="USD"></abbr>
</span>
<span class="money">
  <span class="amount">1.232</span>
  <abbr class="scale" titel="1000000000000">bill.</abbr>
  <abbr class="unit" title="EUR">Euro</abbr>
</span>

or with built-in scale:

<span class="money">
  <span class="amount">99</span>
  <abbr class="scale" title="C">¢</abbr>
  <abbr class="unit" title="USD"></abbr>
</span>
<span class="money">
  <span class="amount">1.232</span>
  <abbr class="scale" titel="TR">bill.</abbr>
  <abbr class="unit" title="EUR">Euro</abbr>
</span>

Commentaires

  • Alternative 1 is the nearest to being correct, according to the model I have proposed. Andy Mabbett 07:24, 2 Jan 2007 (PST)
    • I know, that Alternative 1 is the nearest to your model - but having the measurment format in mind, I think that Alternative 3 would be the more logical approache. I suggested there to have value (in replace for the amount), scale (like you defined the unit) unit (different use: name of the unit - like your currency and for money as a measurement format the unit is limited to the list of ISO 4217). So you would have a compatible measurement format and money as its sub-format --Emil 11:03, 4 Jan 2007 (PST)

pages apparentées