DatedVariant型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Where a flag of a day is, and the other one: what variantOn gives. It is a Variant with the role that was asked, other, which
says that another flag was in the other role that day and why, and withheld.
インポート
import type { DatedVariant } from "@johnmorrisdotca/hata/manifest";
定義
interface DatedVariant extends Variant {
role: FlagRole;
other: OtherFlag | null;
withheld: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
role | FlagRole | The role that was asked, |
other | OtherFlag | null | The flag of the other role on the same day where it is a different flag, with the reason and the page that says so; null where the same flag is both. |
withheld | boolean | True where the flag is restricted and the call did not say |
id | string | Kebab case, unique within the place: "de-facto", "stripes", "local". |
name | string | A name for a menu, in English. |
nameJa | string | The same in Japanese. |
status | "official" | "de-facto" | "historical" | "local" | Its standing: see above. |
from | string | null | When it came into use, as precisely as is known ( |
until | string | null | When it went out of official use; null where it has not. |
roles | FlagRole[] | Which questions this flag answers on its days: |
roleDates | Partial<Record<FlagRole, { from: string | null; until: string | null; }>> | The days of each role it has, where they are not the flag's own |
roleNote | RoleNote | null | Why this flag is only one of the two, or is legal and in use on different days, and who says so; null where it is both on the same days. |
restricted | Restricted | null | Set where the law restricts displaying the flag outside history and education: it is then not in |
why | string | Why it is offered, and (for the default) why it is the default, in a sentence or two. |
source | string | Where the claim above is documented: a web page. |
sourceKind | "official" | "reference" | "encyclopedia" | What kind of page |
default | boolean | True for the one |
module | string | The module that has its SVG: |
frames | Record<"4:3" | "1:1" | "round", "crop" | "cover" | "contain"> | What |
drawing | { source: FlagSource; file: string; page: string; licence: { kind: LicenceKind; name: string; url: string | null; }; author: string | null; credit: string | null; attributionRequired: boolean; restrictions: string[]; uploaded: string | null; width: number; height: number; bytes: number; } | Where this drawing comes from: its Commons file, page, licence, author and size, as for a flag's record. |
例
import { variantOn, type DatedVariant } from "@johnmorrisdotca/hata/manifest";
const found: DatedVariant | null = variantOn("CA", "1962-09-29");
console.log(found?.id); // "union-flag": the legal flag
console.log(found?.other?.id); // "red-ensign-1957": the flag flown in practice
console.log(found?.other?.note?.why); // "Canadians flew the Red Ensign from the 1870s …"union-flag
red-ensign-1957
Canadians flew the Red Ensign from the 1870s and the Admiralty approved it for Canadian ships in 1892, but the government kept the Union Flag as the national flag in law until the Maple Leaf flag took over on 1965-02-15. An order in council of 1945 let the Red Ensign fly on federal buildings; it did not make it the national flag.出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。