ਸਮੱਗਰੀ 'ਤੇ ਜਾਓ

ਫਰਮਾ:ISO 4217/code/doc

ਵਿਕੀਪੀਡੀਆ, ਇੱਕ ਆਜ਼ਾਦ ਵਿਸ਼ਵਕੋਸ਼ ਤੋਂ

Utilising the alpha3 ISO 4217 code. For example, the code number can be derived from the code. Based on the ISO 4217 Standfard definition (per {{ISO 4217/cite}}, October 2022 ਤੱਕ ).

There are 304 unique codes (ADP..ZWR). Codes are reused (as currency in history, in history with different end-date by country, in List Two funds, in entities) resulting in 452 currency definitions (data rows).

General

[ਸੋਧੋ]
|iso-code=
|format=
|is-obsolete=

Most parameters work by {{yesno}} principle: yes, 1, true, <anytext> and no, 0, false, <blank> are recognised as T/F.

See also § maintenance-category ISO 4217
|format=-options can be comma-separated list: |format=option-none, ISO4217-cat, mono, brackets, (as announced per template)

Base: iso-code

[ਸੋਧੋ]

ISO 4217/code

[ਸੋਧੋ]

Returns valid ISO 4217 code or blank.

|iso-code=
Basic: |format=<blank> returns EITHER the code as exists OR <blank> (no tracking etc)
|format=option-none, ISO4217-cat
See § maintenance-category ISO4217

Other data (ref, comment) elsewhere. Data 17 October 2022 ਤੱਕ , per source {{ISO 4217/cite}}

iso-code error (maintenance category)

[ਸੋਧੋ]
|format=ISO4217-cat will categorise articles with ISO-codes that do not exist in ISO. Sorted under C.
(When in Template space, a wikilink to the category will show: |iso-code=ZZZਫਰਮਾ:ISO 4217/maintenance-category)
See § maintenance-category ISO4217

option-none (code='None')

[ਸੋਧੋ]
|format=option-none will allow |iso-code=''None'', none, no (formatting is optional).
Internally, {{ISO 4217/code-none}} returns _NONE_ or <blank>.

When code "None" is not allowed |format=option-none, |iso-code=None input is considered unrecognised code (returns blank). Will be categorised from mainspace, sorted under N.

(In Template space: |iso-code=None → None)
See § maintenance-category ISO4217

Examples

[ਸੋਧੋ]
in plain is "None"? |format=option-none
option-none=<absent>
|format=ISO4217-cat number minor unit
|iso-code=USD USD USD USD (840) 0.01
|iso-code=''None'' _NONE_ None
None
None 0.01
|iso-code=ZZZ ਫਰਮਾ:ISO 4217/maintenance-category ਫਰਮਾ:ISO 4217/maintenance-category 0.01
|iso-code=<blank>

Derived value templates

[ਸੋਧੋ]

minor unit

[ਸੋਧੋ]
  • "Minor unit" in ISO 4217: number of decimals for minor unit used in currency trade. For example, USD has Minor unit=2, i.e. 0.01 (dollarcent unit).

Occurring values are: <blank>, N.A., 0, 2, 3, 4. So, incidentally, 1 (for ਫਰਮਾ:Cursign 0.1) is not present. Obsolete currency (historical, List Three): has no minor unit ("blank").

In enwiki: "<blank>", "N.A.", "0" all return blank, because "ਫਰਮਾ:Cursign 1" is not a subunit of "ਫਰਮਾ:Cursign 1".
|iso-code=, |is-obsolete=, |format=blank/default (0.001-form), exponent (N.A., <blank>, 0, 2, 3, 4)
Examples
<blank> AFA: →
N.A. XPD: →
0 KRW: →
1 (not present)
2 RUB: 0.010.01
3 OMR: 0.0010.001
4 CLF: 0.00010.0001

Ambiguous code & minor units

[ਸੋਧੋ]
  • 10 codes are ambiguous: they appear both obsolete and active: |ANG|EUR|HRK|IDR|MWK|PEN|RON|SDG|SZL|TRY.
For example, PEN refers to an obsolete and an active currency. These have different exponents.
|is-obsolete=no/yes sets the right one. Default is: |is-obsolete=no (currency PEN is active}})
Example
PEN is ambiguous, required |is-obsolete= specifier.
USD is not ambiguous (active, |is-obsolete= is trivial)
ESA is not ambiguous (historical, List Three; |is-obsolete= is trivial)
Other not a code

PEN

|is-obsolete=1999 >< (obsolete)
|is-obsolete=no >0.01< (active)
|is-obsolete= >0.01< (active, default)
|<absent>= >0.01< (active, default)
  • USD >0.01<
  • PEN >0.01<
  • FOO >0.01<
  • blank ><
is-obsolete=1999
  • USD >0.01<
  • PEN ><
  • FOO ><
  • blank ><
is-obsolete=no
  • USD >0.01<
  • PEN >0.01<
  • FOO >0.01<
  • blank ><
is-obsolete=yes
  • USD >0.01<
  • PEN ><
  • FOO ><
  • blank ><

code-to-number

[ਸੋਧੋ]
  1. Code and number are 1:1 (code=number; number=code).
  2. Three codes defined to have no number: XFO, XFU, XRE (all obsolete)
  3. 17 October 2022 ਤੱਕ : 304 existing unique alpha3-codes (over Lists One, Two and Three). Alphacode can have zero or one number (but not multiple). Numbers can repeat (eg ALL, ALK=008).
  • |format=<blank>, plain [=default]; brackets

Follows from code. Unknown code=blank. No tracking.

code-is-ambiguous

[ਸੋਧੋ]
  • 10 codes are ambiguous, they appear both obsolete and active: |ANG|EUR|HRK|IDR|MWK|PEN|RON|SDG|SZL|TRY.
For example, EUR is active in ਫਰਮਾ:Smallcaps2, and obsolete in ਫਰਮਾ:Smallcaps2 per withdrawal-date=2006-10 (List Three). 17 October 2022 ਤੱਕ .
When such code is used, disambiguation may be required (is-obsolete=yes/no), to specify which currency is intended. This is relevant with minor-unit, and manually setting (clarifying)is-obsolete. Used in {{Infobox currency}}.
|format=ISO4217-cat: The article using an ambiguous code, will be categorised, sort under A (for checking, not an error indication).
|format=iso-code, ISO4217-cat |yes-text=anytext, <blank> (note: |yes-text=<blank> is counter-intuitive; useful for categorisation)
|yes-text=<blank> → no returntext (use for silent categorisation |ISOcat=yes)
Tracking: |ISOcat=yes: when ambiguous then → in Category:Pages using ISO 4217 currency to check (0) (catsort under A)
default USD → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
PEN → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
|ISOcat=yes → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
|yes-text=_YES-is-ambig_ → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
|yes-text=<blank> → >ਫਰਮਾ:ISO 4217/code-is-ambiguous< So status=yes, but yes-returntext is suppressed
|yes-text=<blank>, |ISOcat=yes → >ਫਰਮਾ:ISO 4217/code-is-ambiguous< So status=yes, but yes-returntext is suppressed
Extended content
USD → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
FOO → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
PEN → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
ISOcat=yes
USD → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
FOO → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
PEN → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
ISOcat=blank
USD → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
FOO → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
PEN → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
yes-text=_YES-is-ambig_
USD → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
FOO → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
PEN → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
yes-text=<blank>
USD → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
FOO → >ਫਰਮਾ:ISO 4217/code-is-ambiguous<
PEN → >ਫਰਮਾ:ISO 4217/code-is-ambiguous< So status=yes, but yes-returntext is suppressed
PEN → >ਫਰਮਾ:ISO 4217/code-is-ambiguous< So status=yes, but yes-returntext is suppressed

code-to-withdrawal-date

[ਸੋਧੋ]

These codes are both in list-1 and list-3 (active and obsolete). So one must specify wheteher active (no |is-obsolete=<blank>, no or obsolete |withdr-date=1999, yes No tracking. Multiple witdrawal-dats possible

Used in {{ISO 4217/code-minor-unit}}

Not in mainspace

[ਸੋਧੋ]
1 Nov 2022 ਤੱਕ

code-is-obsolete

[ਸੋਧੋ]
|iso-code, is-obsolete=
{{/testcases}}

The logic

[ਸੋਧੋ]
|iso-code=, determines from ISO 4217. Thew code can be ambiguous.
|is-obsolete=: yes/no (T/F), blank='unknown'
{{yesno}} is applied: |is-obsolete=no, false=no (not obsolete, so active), |is-obsolete=<any text> is yes (obsolete)
Currency is obsolete?
|is-obsolete=T/F/unk
T=obs 01 F=act 02 unk 03
code
|iso-code=
ABC/unk

T/F/ambig/unk
T=obs 10 OBS 11 Red XNACT 12 OBS 13
F=act 20 Red XNOBS 21 ACT 22 ACT 23
ambig 30 OBS 31 ACT 32 ACT (default) 33
unk 40 OBS 41 ACT 42 ACT (default) 43
  • Red XN Contradicting situation: Obsolete vs. Active. By default |code-priority=no, so |is-obsolete=T/F decides.

Contradiction solving

[ਸੋਧੋ]

Two situations imply a contradiction: the ISO-status contradicts the entered |is-obsolete= status. This may occur when an infobox covers more than one currency. The default handling is: |is-obsolete= takes precedence. By setting |code-priority=yes gives ISO code prority (result opposite). This does not resolve the contradiction.

Currency is obsolete?
|code-priority=no (default)
|is-obsolete=T/F/unk
T=obs 01 F=act 02
code
|iso-code=...
T/F/...
T=obs 10 OBS 11 Red XNACT 12
F=act 20 Red XNOBS 21 ACT 22
|code-priority=yes
Red XNOBS 12
Red XNACT 21

Returns: when Obsolete, a text; when Active, no text (blank). On can apply this as {{#if:{{code-is-obsolete|...}}|Obsolete|Active}}.

The returntext is:

When obsolete: 1. the |is-obsolete=anytext; 2. the |withdrawal-date=, 3. |obs-text=..., 4. "OBS"
When active: 1. |act-text=... 2. <blank>
Note that, by entering a blank |obs-text=, the returntext will be a blank (so, same as default actual returntext!)


|obs-text=, |act-text= overwrites.

In {{Infobox currency}}
For |obsolete=, |obsolete= of the infobox is used: |obsolete={{{obsolete|}}}

Examples

[ਸੋਧੋ]
|iso-code=, |is-obsolete=
USD, active
ATS, Austria shilling - withdrawn
PEN, PERU Nuevo Sol (ambivalent so wsdate needed)
FOO, not a code
"None", not a code
blank

code-entity-list

[ਸੋਧੋ]

ਫਰਮਾ:ISO 4217/code-count/demo ਫਰਮਾ:ISO 4217/code-count/demo ਫਰਮਾ:ISO 4217/code-count/demo ਫਰਮਾ:ISO 4217/code-count/demo ਫਰਮਾ:ISO 4217/code-count/demo

edge

ਫਰਮਾ:ISO 4217/code-count/demo ਫਰਮਾ:ISO 4217/code-count/demo

code-count

[ਸੋਧੋ]
{{ISO 4217/code-count|iso-code=|list=}}
|list, iso-code=L1, ..., L123
Number of "XYZ" code repetition per list, and over all tyhree lsits. There are 304 unique codes, repetitions make 450 different lines (code, List, entity, end-date can be repeated).
Intended for checking and listformatting only (no new information).

See § code-entity-list for demo

code-to-qid

[ਸੋਧੋ]
{{ISO 4217/code-to-qid/format}}
{{ISO 4217/code-to-qid|iso-code=|format=}}
|format=plain, wl, wl-info, <blank>
(P498), ~265, 08:58, 13 November 2022 (UTC) ਤੱਕ

Maintenance-category (ISO 4217)

[ਸੋਧੋ]

Cat:Category:ISO 4217: →

Sets Category:Pages using ISO 4217 currency to check (0), used in various templates.
Distinguishes: mainspace (=categorise), template space (=colon-link :Category:Pages using ...), all other spaces (no effect).
{{ISO 4217/maintenance-category
|main-sort=
|template-sort=
}}
In template space: {{ISO 4217/maintenance-category}}
In the templates, activated by |ISO4217-cat= or by |format=.., ISO4217-cat, ..
Used by: {{ISO 4217/code}}, {{Infobox central bank}}, {{Infobox currency}} (projected as of October 2022)

Backoffice

[ਸੋਧੋ]

The templates

[ਸੋਧੋ]
Deployed in mainspace
{{/format}} · {{../testcases}}
Not yet used in / fit for mainspace
  • IB does cat eponym eg in euro

See also

[ਸੋਧੋ]

ਫਰਮਾ:ISO 4217/navbox templates