JapaneseEra型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
An era, as it is written, said and counted: one row of JAPANESE_ERAS.
インポート
import type { JapaneseEra } from "@johnmorrisdotca/hikidashi/wareki";
ほかのエクスポート元: @johnmorrisdotca/hikidashi
定義
type JapaneseEra = {
kanji: string;
romaji: string;
reading: string;
startYear: number;
lastYear: number | null;
startDate: string;
endDate: string | null;
spellings: readonly string[];
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
kanji | string | The name in kanji, which is how a date is written. |
romaji | string | The Latin name, capitalised as English writes it. |
reading | string | The reading in hiragana, for anyone meeting the kanji for the first time. |
startYear | number | The Western year the era's first year falls in. |
lastYear | number | null | The highest year the era reached, or null while it is still running. 昭和 ran to 64 and 平成 to 31, so 昭和65 is not a date and answering with 1990 would be a wrong answer rather than a missing one. |
startDate | string | The era's first day, as |
endDate | string | null | The era's last day, as |
spellings | readonly string[] | Every spelling the name is written with in Latin letters, in lower case. The long vowels are the reason there is a list rather than one string: 昭和 is Showa, Shouwa and Shōwa depending on whose romanization somebody learned, and all three are the same era. |
例
import { JAPANESE_ERAS, type JapaneseEra } from "@johnmorrisdotca/hikidashi/wareki";
const heisei: JapaneseEra = JAPANESE_ERAS[3]!;
console.log(heisei.kanji, heisei.romaji, heisei.reading, heisei.startDate, heisei.endDate, heisei.lastYear);平成 Heisei へいせい 1989-01-08 2019-04-30 31出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。