currency-proposal

(Difference between revisions)

Jump to: navigation, search
(Added feature/benefit)
Current revision (23:26, 18 March 2013) (view source)
(proposal out of date, needs updating with microformats2)
 
(22 intermediate revisions not shown.)
Line 1: Line 1:
 +
'''This proposal is years out of date. It needs to be updated with [[microformats2]] and using modern [[currency-examples]].''' - [[User:Tantek|Tantek]] 23:26, 18 March 2013 (UTC)
 +
= Currency =
= Currency =
'''currency''' is a simple microformat for marking up money amounts, such as prices of products/services or financial facts.
'''currency''' is a simple microformat for marking up money amounts, such as prices of products/services or financial facts.
 +
 +
''Note: an alternative proposal can be found at [[measure]], treating currency as simply a specific kind of measurement.''
== Introduction ==
== Introduction ==
Money amounts are one of the most widespread content found on the Web, but the lack of unambiguous representation of the currency they are expressed in, or the date that they relate to, makes comparison and matching of offerings online difficult.
Money amounts are one of the most widespread content found on the Web, but the lack of unambiguous representation of the currency they are expressed in, or the date that they relate to, makes comparison and matching of offerings online difficult.
 +
 +
== Acknowledgments ==
 +
 +
This proposal was written based on the contributions of several members of the community. Original brainstorming ideas and strawman proposal can be viewed at [[currency-brainstorming]] and [[currency-brainstorming#Andy_Mabbett]]
== Scope ==
== Scope ==
Line 26: Line 34:
* Required <code>amount</code>: can mark up a machine-readable numerical value with a <code>span</code>element or a string value with a <code>abbr</code> whose <code>title</code> attribute contains the machine-readable numerical value (See [[abbr-design-pattern]]).
* Required <code>amount</code>: can mark up a machine-readable numerical value with a <code>span</code>element or a string value with a <code>abbr</code> whose <code>title</code> attribute contains the machine-readable numerical value (See [[abbr-design-pattern]]).
-
* Optional <code>currency unit</code>, or reference to a currency unit (See [[include-pattern]]). Must contain a ISO 4217 compliant code.
+
* Optional <code>currency</code>, or reference to a currency (See [[include-pattern]]). Must markup a ISO 4217 compliant code or use the [[abbr-design-pattern]] to provide the equivalent ISO 4217 machine readable value to the marked up human-readable value.
 +
* Optional <code>unit</code>, or reference to a unit of the currency (See [[include-pattern]]), for instance a "dollar" or "cent". This proposal does not specify how the unit must be marked up. This is the focus of the [[measure]] microformats. When not present, the unit is assumed to be the default unit for the given currency. For instance, "Dollar" for the U.S. currency.
* Optional <code>date</code> following the [[datetime-design-pattern]], specifies the date that must be used to evaluate the value of the currency unit used.
* Optional <code>date</code> following the [[datetime-design-pattern]], specifies the date that must be used to evaluate the value of the currency unit used.
=== Examples ===
=== Examples ===
-
Simple in-line example with local definition of the currency unit: <span class="money"><abbr class="currency unit" title="USD">$</abbr><span class="amount">39.99</span></span>
+
Simple in-line example with local definition of the currency unit: <span class="money"><abbr class="currency" title="USD">$</abbr><span class="amount">39.99</span></span>
<pre>
<pre>
-
<span class="money"><abbr class="currency unit" title="USD">$</abbr><span class="amount">39.99</span></span>
+
<span class="money"><abbr class="currency" title="USD">$</abbr><span class="amount">39.99</span></span>
</pre>
</pre>
-
Text representation of the amount: <span class="money"><abbr class="amount">Thirty-nine</abbr> <abbr class="currency unit" title="USD">Dollars</abbr></span>
+
Text representation of the amount: <span class="money"><abbr class="amount">Thirty-nine</abbr> <abbr class="currency" title="USD">Dollars</abbr></span>
<pre>
<pre>
-
<span class="money"><abbr class="amount" title="39">Thirty-nine</abbr> <abbr class="currency unit" title="USD">Dollars</abbr></span>
+
<span class="money"><abbr class="amount" title="39">Thirty-nine</abbr> <abbr class="currency" title="USD">Dollars</abbr></span>
</pre>
</pre>
-
Table example with global definition of the currency unit:
+
Example using the <code>unit</code> class: <span class="money"><span class="amount">99</span><abbr class="unit">&cent;</abbr><abbr class="currency" title="USD"></abbr></span>
 +
 
 +
<pre>
 +
<span class="money"><span class="amount">99</span><abbr class="unit">&cent;</abbr><abbr class="currency" title="USD"></abbr></span>
 +
</pre>
 +
 
 +
Table example with global definition of the currency:
<pre>
<pre>
   <table>
   <table>
-
       <tr><th>Price in <abbr id="u1" class="currency unit" title="USD">US$</abbr></th></tr>
+
       <tr><th>Price in <abbr id="u1" class="currency" title="USD">US$</abbr></th></tr>
       <tr><td><div class="money">39.99<a href="#u1" class="include"></a></div></td></tr>
       <tr><td><div class="money">39.99<a href="#u1" class="include"></a></div></td></tr>
   </table>
   </table>
</pre>
</pre>
 +
 +
== Issues ==
 +
 +
Discussion of this proposal by specific problems on [[currency-issues]].
 +
 +
==Related pages==
 +
{{currency-related-pages}}

Current revision

This proposal is years out of date. It needs to be updated with microformats2 and using modern currency-examples. - Tantek 23:26, 18 March 2013 (UTC)

Contents

Currency

currency is a simple microformat for marking up money amounts, such as prices of products/services or financial facts.

Note: an alternative proposal can be found at measure, treating currency as simply a specific kind of measurement.

Introduction

Money amounts are one of the most widespread content found on the Web, but the lack of unambiguous representation of the currency they are expressed in, or the date that they relate to, makes comparison and matching of offerings online difficult.

Acknowledgments

This proposal was written based on the contributions of several members of the community. Original brainstorming ideas and strawman proposal can be viewed at currency-brainstorming and currency-brainstorming#Andy_Mabbett

Scope

This proposal limits its scope to:

Features

Root Class Name

The root class name for a money amount is money.

Property List

Examples

Simple in-line example with local definition of the currency unit: $39.99

<span class="money"><abbr class="currency" title="USD">$</abbr><span class="amount">39.99</span></span>

Text representation of the amount: Thirty-nine Dollars

<span class="money"><abbr class="amount" title="39">Thirty-nine</abbr> <abbr class="currency" title="USD">Dollars</abbr></span>

Example using the unit class: 99¢

<span class="money"><span class="amount">99</span><abbr class="unit">¢</abbr><abbr class="currency" title="USD"></abbr></span>

Table example with global definition of the currency:

   <table>
      <tr><th>Price in <abbr id="u1" class="currency" title="USD">US$</abbr></th></tr>
      <tr><td><div class="money">39.99<a href="#u1" class="include"></a></div></td></tr>
   </table>

Issues

Discussion of this proposal by specific problems on currency-issues.

Related pages

currency-proposal was last modified: Monday, March 18th, 2013

Views