Description
Format the first year with 元年 and later years as the number followed by 年.
Calendar coordinates depend on an era, origin, day-start rule, and sometimes an arithmetic rather than observational convention. A supplied coordinate difference does not resolve those choices.
Format the first year with 元年 and later years as the number followed by 年.
When to use this tool
Use Japanese Era Year Gannen Token when you need a documented calendar convention or source-coordinate comparison.
How to use the tool and how it works
- Enter eraName, eraYear. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read label. Use the output convention below.
Require nonempty eraName and positive eraYear. Format the first year with 元年 and later years as the number followed by 年.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| eraName | Era Name | Required. Text; maximum UTF-16 length 8192. |
| eraYear | Era Year | Required. Safe integer; minimum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| label | Formatted label for the supplied components under the convention above. | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"eraName": "令和",
"eraYear": 1
},
"output": {
"label": "令和元年"
}
} Limitations and assumptions
- This does not verify the era name, year bounds, transition date, or a Gregorian equivalent.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Consult the source calendar and authoritative date information for actual observance, conversion, or historical dating.
References
Similar or alternative tools
- Regnal Year Source Label
Require nonempty rulerLabel and source plus positive regnalYear, then format a source-qualified regnal-year label.
- European Charter Indiction Source Token
Require indiction from one through 15 and nonempty sourceId, then format indiction number [sourceId].