Convert a date to the Japanese era (wareki) / 西暦から和暦

Convert a Gregorian date (YYYY-MM-DD) to the Japanese era calendar, e.g. 2026-10-07 → 令和8年10月7日 (wareki_short R8.10.07, zero-padded). Year 1 is written 元年. Supported from 1873-01-01 (the Gregorian calendar was adopted on 明治6年1月1日). Eras: 令和 (R) from 2019-05-01, 平成 (H) from 1989-01-08, 昭和 (S) from 1926-12-25, 大正 (T) from 1912-07-30, 明治 (M) from 1868-01-25. flags: assumes_current_era for dates after today (the era might change). / 西暦の日付を和暦にする。1年目は「元年」。明治6年(1873年)1月1日から。今日より後の日付には assumes_current_era。

get/v1/japanese-era/to-era

Request

  • Base URL: https://biz.ossalt.jp
  • URL: https://biz.ossalt.jp/v1/japanese-era/to-era
  • Auth: none declared

Query parameters

datestring required

Date (YYYY-MM-DD) / 日付

Response

OK

resultobject required

The answer / 結果

sourceobject required

Source and verification / 出典と照合の状況

as_ofstring required

Reference date in Japan time (YYYY-MM-DD) / 基準日(日本時間)

notesstring[] required

Assumptions such as estimated values / 前提(見込みの値など)

flagsstring[] required

flags holds machine-readable codes: estimated (a value is an estimate, e.g. a future equinox day — tell the user), unverified (year not yet checked against Cabinet Office data — tell the user), assumes_current_era (a future date written in the current era — tell the user), outside_era (the era date given is outside that era), weekday_mismatch, closed (the company's registry record is closed — tell the user), excluded_from_search, truncated, not_found, exact_match_only, partial, ambiguous, city_not_found, ambiguous_city.

Changes

No recorded changes to this operation across all 1 revision of this API.