本文へ移動

Hata旗

国や地域の旗を読み込み、対応する表示の形を選び、絵ごとの資料・作者・ライセンスを保てます。

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

目次

リファレンス · 旗の資料と表示の情報

FlagOnDay型

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

The full answer for a day: the flag, variant (as variantOn gives it, with other and withheld), and where there is no drawing to give none says why, in a sentence, never a bare null. For <hata-flag>, a page that must explain a blank, or a table of a country's history.

インポート

import type { FlagOnDay } from "@johnmorrisdotca/hata/manifest";

定義

interface FlagOnDay {
    date: string;
    role: FlagRole;
    variant: DatedVariant | null;
    none: NoFlag | null;
}

メンバー

名前型説明
datestring

The day asked, YYYY-MM-DD.

roleFlagRole

The role asked.

variantDatedVariant | null

The flag, or null.

noneNoFlag | null

Why there is no drawing to give; null where there is one.

例

import { flagOn, type FlagOnDay } from "@johnmorrisdotca/hata/manifest";

const day: FlagOnDay = flagOn("DE", "1940");
console.log(day.variant?.id);   // "swastika-1935"
console.log(day.none?.kind);    // "restricted"
console.log(flagOn("CA", "1850").none?.kind); // "not-yet"
console.log(flagOn("CA", "1962-09-29").none); // null: there is a flag to draw
swastika-1935
restricted
not-yet
null

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

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

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