Open main menu

Changes

add category
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE -->
{{Intricate template}}

This template converts a year number in the [[Gregorian calendar]] into the corresponding [[Japanese era|era year]] in the [[Japanese calendar]]. It depends on the {{tl|Nengo}}, {{tl|Japanese era}}, and {{tl|Japanese year number}} templates. If the era cannot be determined by the {{tl|Nengo}} template, the output of this template will be blank. If the given year is a transitional year between eras, the new era's year will be given for the entire year, disregarding month and day of the actual transition date.

This template expects the Gregorian year to be passed either using the named <code>year</code> parameter or the first unnamed parameter, i.e. <code>{{tlp|Japanese year|year&#x3D;2006}}</code> or <code>{{tlp|Japanese year|2006}}</code>.

===Sample output===
{{Aligned table
|class=wikitable
|col1style=font-family:monospace;padding-right:1.0em;
|col2style=padding-left:1.0em;padding-right:1.0em;
| {{sans-serif|'''Wikitext'''}} | '''Output'''
| <nowiki>{{Japanese year|476}}</nowiki> | {{Japanese year|476}}
| <nowiki>{{Japanese year|1988}}</nowiki> | {{Japanese year|1988}}
| <nowiki>{{Japanese year|1989}}</nowiki> | {{Japanese year|1989}}
| <nowiki>{{Japanese year|2006}}</nowiki> | {{Japanese year|2006}}
}}

<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox |
| <!-- CATEGORIES BELOW THIS LINE, PLEASE: -->
[[Category:Date conversion templates]]
[[Category:Date mathematics templates]]
}}</includeonly>
Anonymous user