本文へ移動

Kuni国

国、コード、名前、行政区画を調べ、必要なときに国のデータを読み込み、標準の国のカードを表示できます。

「国(くに)」は、国を表す日本語です。 名前について(英語)

目次

リファレンス · 廃止された国のコード

WithdrawnCountry型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

A country that was withdrawn from ISO 3166-1, as ISO 3166-3 lists it (frozen).

インポート

import type { WithdrawnCountry } from "@johnmorrisdotca/kuni/withdrawn";

定義

interface WithdrawnCountry {
    code: string;
    alpha2: string;
    alpha3?: string;
    numeric?: string;
    name: {
        en: string;
        ja: string | null;
    };
    since: string;
    until: string;
    successors: readonly string[];
    reusedBy?: string;
}

メンバー

名前型説明
codestring

The four-letter ISO 3166-3 code: "SUHH" for the Soviet Union. Its first two letters are the alpha-2 code.

alpha2string

The ISO 3166-1 alpha-2 code it held: "SU".

alpha3 (省略可)string | undefined

The alpha-3 code it held, "SUN", as ISO 3166-3 lists it.

numeric (省略可)string | undefined

The numeric code it held, "810"; absent where ISO 3166-3 lists none (Gilbert and Ellice Islands, New Hebrides).

name{ en: string; ja: string | null; }

Its name in English and Japanese; ja is null where Wikidata has none, never an English name copied in.

sincestring

The year its code came into force, "1974" (a full day, "1974-12-15", where Wikidata gives one).

untilstring

The year its code was withdrawn, "1992", or a full day, "1990-08-14".

successorsreadonly string[]

The new codes ISO 3166-3 lists for it, in ISO's order: ["AM", "AZ", ...] for the Soviet Union. A successor may itself be withdrawn: Yugoslavia's is "CS", which withdrawn("CS") resolves to Serbia and Montenegro (CSXX) first and Czechoslovakia (CSHH) after it.

reusedBy (省略可)string | undefined

Set when the alpha-2 code was later given to a current country, so that the code means two things in time: "BY" was the Byelorussian SSR and is Belarus. The value is that country's alpha-2 code. Absent for codes nobody has been given again (SU, YU, CS, DD, ZR, TP, AN, BU).

例

import type { WithdrawnCountry } from "@johnmorrisdotca/kuni/withdrawn";
import { withdrawn } from "@johnmorrisdotca/kuni/withdrawn";

const value: WithdrawnCountry = withdrawn("SU")[0]!;
console.log(typeof value === "object" ? Object.keys(value).slice(0,6) : value);
[ 'code', 'alpha2', 'name', 'since', 'until', 'successors' ]

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/kuni 1.4.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。