Skip to the content

Hata旗

Load a native country or region flag, choose supported framing and keep each drawing’s source, author and licence.

Hata (旗) is Japanese for a flag. About the name

Contents

Reference · Flag source and framing metadata

FlagOnDaytype

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 it

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

Definition

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

Members

NameTypeDescription
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.

Examples

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

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hata 1.31.0.