リファレンス
/japanese
import { … } from "@johnmorrisdotca/koyomi-calendars/japanese";
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The Japanese calendar facts a date page can show, computed and never looked up: the public holidays (国民の祝日, kokumin no shukujitsu), the old calendar date
(旧暦, kyūreki, the lunisolar calendar of the Tenpō era's rules) and the six-day cycle (六曜, rokuyō). Pure functions of the date: no clock, no network, no table.
A date the method cannot settle gives null, never a guess.
Holidays: the Act on National Holidays (国民の祝日に関する法律, Act No. 178 of 1948) as amended through the Happy Monday changes of 2000 and 2003, the Greenery and Showa Day change of 2007, Mountain Day (2016), the imperial succession of 2019, the Olympic moves of 2020 and 2021 and Sports Day (2020), for the years 2000 to 2099. Equinox days (春分の日, 秋分の日) use the formula the National Astronomical Observatory of Japan (国立天文台) publishes for 1980 to 2099; the Observatory announces each year's day in February of the year before, so a far year is its prediction. Substitute holidays (振替休日, the next day that is not a holiday, since 2007; the Monday, before) and Citizens' Holidays (国民の休日, a day between two holidays) are derived by the Act's own rules. The law in force in November 2026 is assumed for later years; an amendment changes this file, not a stored list.
Old calendar: the month starts on the Japan Standard Time (UTC+9) date of the new moon; the month that holds the winter solstice is the 11th; each other month is
numbered by the principal term (中気, chūki: solar longitude 0°, 30°, ... 330°) it holds, and the first month with none in a year of thirteen months is the leap
month (閏月, uruu-zuki) with the number of the month before it. The new moon is Meeus's (Astronomical Algorithms, 2nd ed., 1998, chapter 49) and the sun's apparent
longitude his chapter 25 (about 0.01°, ten to fifteen minutes): a new moon or a principal term within 30 minutes of midnight in Japan makes the date null.
Years 1900 to 2100.
Rokuyō: 先勝, 友引, 先負, 仏滅, 大安, 赤口 by (old month + old day) mod 6 (the month number of a leap month is that of the month before it).
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
JAPANESE_HOLIDAY_YEARS | 定数 | The first and last year the holiday rules describe. |
japaneseHoliday | 関数 | The public holiday of a day, in both languages. |
JapaneseHoliday | 型 | A Japanese public holiday's name, in Japanese and in English. |
japaneseHolidaysOf | 関数 | Every public holiday of a year, computed from the law's rules. |
OLD_CALENDAR_YEARS | 定数 | The first and last year the old-calendar astronomy is held to. |
oldCalendarDate | 関数 | The old-calendar date of a Gregorian date, from the new moons and the sun's longitude. |
OldDate | 型 | A date of the old Japanese calendar (旧暦, kyūreki): a month 1 to 12, a day, and whether the month is a leap month. |
Rokuyo | 型 | One day of the six-day cycle (六曜, rokuyō): its name, its reading and an English gloss. |
ROKUYO | 定数 | The six days in order of (old month + old day) mod 6, with the reading and an English gloss. |
rokuyoOf | 関数 | The day of the six-day cycle (六曜, rokuyō) of a Gregorian date. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。