本文へ移動

Kuni国

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

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

目次

リファレンス · 地域と国際機関

unknownMembersOf関数

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

The members of an international body on a day whose membership on that day is unknown: those with no joining day in any source, and those whose joining or leaving year or month is the day's and no day is given; membersOf(id, { on }) leaves them out. Without on, or for a grouping that is not a body, none.

インポート

import { unknownMembersOf } from "@johnmorrisdotca/kuni/groupings";

定義

function unknownMembersOf(id: string, options?: GroupingDateOptions): readonly string[] | null

引数

名前型説明
idstring

The grouping's id.

options (省略可)GroupingDateOptions

on, a day such as "2015-01-01".

戻り値

readonly string[] | null

The codes, frozen, in order; null for an id that is not a grouping.

例

import { membersOf, unknownMembersOf } from "@johnmorrisdotca/kuni/groupings";

console.log(membersOf("g20", { on: "2015-01-01" })?.includes("AR"));        // false when no source gives Argentina's day
console.log(unknownMembersOf("g20", { on: "2015-01-01" })?.includes("AR")); // true: unknown, not a non-member
console.log(unknownMembersOf("g7", { on: "1975-06-01" })?.includes("DE")); // true: the page gives 1975 only
console.log(membersOf("g7", { on: "1976-12-31" })?.includes("CA"));          // true: 1976 counts from its end
console.log(unknownMembersOf("g20"));                                       // []
false
true
true
true
[]

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

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

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