Jump to content

Wikifunctions:Type proposals/Currency

From Wikifunctions

Use/Why

Currencies are used all across the modern world, and, should have a representation on Wikifunctions. They shouldn't be conflated with measurement units, since they behave slightly different from physical quantities.

Types

This proposal would create 2 types

Currency unit

This is the type of currency. It should just be a 3 letter string, with the currency's ISO-4217 code.

Currency measurement

This is the amount of a currency to represent. It should consist of a rational number and a Currency Unit.

Renderer

For Currency units, the full name should be rendered. For Currency measurements, the currency symbol and value should be displayed, in a language-specific manner. The value should be rendered as a decimal number with all the digits (for example, $26 should be rendered as "$26.00" in English).

Validator

The validator will make sure that a given unit is three letters, and is a valid active, historical, or non-standard ISO-4217 code.

Alternatives

  • The currency unit could be displayed as the ISO-4217 code, or simply the symbol
  • Instead of Currency unit, we could simply use Z6091

Comments