currency-examples

From Microformats Wiki
Revision as of 01:10, 29 April 2007 by Gazza (talk | contribs) (UK Government Data Standards Catalogue example)
Jump to navigation Jump to search

Currency Examples

The following are real-world examples and brainstorming for marking up currency.

The Problem

The problem: how to explicitly specify a) that a figure/number relates to money; b) the currency of a stated figure; and c) the period in which that figure was current.

  • The currency sign cannot be used reliably since the same sign (or symbol) may represent more than one currency. eg. $ is used for many different dollars (USD, AUD, CAD...) and even other units like pesos.
  • The language of the page is not sufficient to define the currency of prices in the page:
    • More than one currency may be used by people who speak the same language.
    • The page may be written in one language and still quote prices/figures in a different country's currency.
    • Even if a country can be identified, more than one currency may be used in that country.

Converting currency figures is a reasonably easy problem to solve as indicated by the #Existing_Practices. However many automated conversion tools must make assumptions about the original figure's currency -- e.g. assuming a USD for all uses of $, or British Pounds for £ (which is also sometimes used to denote Lira).

Currency Changes

I wish to expand on one of the points mentioned above: there might be two or more currencies in the same country: e.g. in Romania

  • ROL - Romanian Lei [being phased out]
  • RON - Romanian New Lei
  • after Romania joins the EU, the RON will be replaced by Euro, too (not imediately, probably in 2-3 years)

Although the three letter code is different in this case, the currency is often given as Lei. There are other countries, where similar examples exist/existed. The two currencies might have an identical name, yet they have 2 very different meanings. Usually there is a difference of 3-4 orders of magnitude between the old currency and the new currency. discoleo


Related problems

"Amounts" in arbitrary units is a bit harder and necessary for several applications.

For example, consider the work that has been done on a recipe microformat.

recipe-examples

Though we haven't reached this problem yet in the research, I can see it coming:

Say you wanted to create a "shopping list" application which you could tell which recipes you wanted to cook, and have it automatically total up all the various amounts of ingredients and give you the net amount of stuff you wanted to pick up.

It would need to be able to determine precise amounts/units of each ingredient. This might turn out to be like the currency problem, or it might be more complex, given the variety of units used in recipes, English vs. metric etc. That's a case that might need a microformat. We need more research and analysis to really justify it, but I can see it within the realm of probable possibility.

Use of currency amounts in tables

Representing currency amounts in a table format is very common. For instance, see Google Financials.

In this table representation, it does not make sense to provide the currency information for each cell. Instead, it should be provided once at the table, thead, tr, or th, level, and then a td may override the default value. This is very similar to the common practice of indicating the currency and formatting in plain english: "Numbers in thousands of dollars" in the table title/subtitle or legend.

The microformat for currency amounts should provide a way to represent a default currency for all children of a table, thead, tr, or th nodes. The currency symbol/abbreviation should be optional in for elements defined as containing currency values/amounts, if a default currency has been defined in one of the ancestor elements.

Contributors

Real-World Examples

Links to public web pages, either popular or insightful

UK Government Data Standards Catalogue

The associated XML Schema seems to suggest an Amount element, followed by a fixed Currency element of "GBP".

SkypeOut Pricing

2.1 US cents/2.4 CAN cents per minute

(on the Web page)

¢2.1 USD (or ¢2.4 CAD) per minute.

(in the announcement email)

See also measure

MIT Enterprise Forum

$1 million in equity
$2.50 a share

See also measure

Energy Information Administration

23 cents per barrel

Also in this page:

(U.S. Cents per Gallon)
(Euros per Thousand Liters)
(U.S. Dollars per Gallon)

See also measure

CBCNews

$63.94 US per barrel, up $1.63 US

Google Finance

The current price of a stock:

<span class="pr">401.90</span>

eBay

eBay marks prices as "ebcPr". eBay c? Price.

<td class="ebcPr"><span class="bold">$11.70</span><br/><span>$12.95</span><br/></td>

Google

The Google Web Authoring Statistics mentions that "price" is the 40th most used class name.

Something like:

<span class="price">$39.99</span>

McAfee

<span class="price">$39.99 <span class="currency">(USD)</span></span>

Amazon

<td class="price">$34.85</td>

Bell Canada in French Canadian

<b>Niveau de service Premium - 125 $*</b>

Note the placement of the dollar sign AFTER the number.

Bell Canada in US English

<b>Premium Service Level - $125*</b>

Historic prices

  • West Midland Bird Club:
  • Wikipedia: Bleak House
    • "Like most Dickens novels, Bleak House was published in 19 monthly instalments, each containing 32 pages of text and two illustrations by Phiz. Each cost one shilling, except for the last, which was a double issue and cost two." Dates in the subsequent table range monthly from March 1852 - September 1853
  • Wikpedia: 1922 in Germany
    • "Despite the ending of cash payments for the rest of 1922, the main cause of Germany's inability to pay, the steady depreciation of the mark, was ongoing. Towards the end of the year it assumed a disastrous rapidity. On August 1, the US Dollar still stood at 643 Marks to the Dollar and the British Pound at 2,850 Marks to the Pound. But on September 5 the dollar had already risen to 1,440 Marks and the pound to 6,525 Marks, and in December the pound was worth between 30,000 and 40,000 marks and the dollar between 7,000 and 9,000."
  • BBC News story dated 2 January, 2001
    • "A barrel of Brent crude for February delivery came within range of $25 a barrel on Tuesday before slipping to $24.35, a closing price 48 cents above Friday's closing price of $23.87. In New York, the price of Nymex (New York Merchantile Exchange) crude reached $27.40 a barrel before settling at $27.40, a gain of 41 cents or 1.5% on the day. Nymex oil prices in 2000 averaged $30.20 a barrel, the highest level since 1983, and well above the 1999 average of $19.25. Traders also saw support for the oil price from the Opec basket of seven crude oils which stood at $21.75 a barrell on 29 December 2000. That was the seventh day the price stayed below a preferred range of $22-$28 a barrell. Under an Opec price stability measure, output will be cut by 500,000 barrels a day if the basket price stay below $22 for more than 10 days."
  • BBC News story dated 5 September, 2000
    • "The Millennium Commission's decision to grant an extra £47m to the Dome has been widely condemned by MPs on various political hues."
  • Jamaica and the Great War
    • "in 1917 [...] unemployment was high and wages were low - men received 9 pence a day to cut cane."
  • Money and Coinage in Victorian Britain
  • Macaulay on the State of England in 1685
    • "In 1661 the justices at Chelmsford had fixed the wages of the Essex labourer, who was not boarded, at six shillings in winter and seven in summer."
  • BBC - WW2 People's War
    • "I left [school] at Easter 1938. As soon as I had left school, my Father insisted that I went to work for my Uncle. My wages were 5 shillings per week plus board & lodgings"
  • Relative Value of Sums of Money

Existing Practices

Firefox Extension

Firefox Currency Converter - ViewMyCurrency

Note: the current bug list illustrates some problems of identifying currencies based on page content alone:

  • All $ symbols are treated as USD Very annoying if you are Australian, Canadian etc. (Needs a new feature)
  • ‘Euro 2006 Championship’ should not be converted.
  • ...
  • Don’t convert CVS keywords . $Revision: 1.3 $ should not be treated as dollars.

Greasemonkey Scripts

Exchequer

Yahoo! Finance Currency Converter

Relevant Standards

ISO 4217 Codes


See also

  • Google code - classes - discussion of class="price" (the 40th most used class on the web) and the case for attributes for unambiguous specification of currency (see final paragraph).
  • PACIFIC Exchange Rate Service - dynamic tables of historic currency conversion rates

Related pages