Home > Basic Time Information > Calendar > Calendars > Japanese Calendar (Expression Format)

Japanese Calendar (Expression Format)

How to specify format

Input and output format is specified with format specifiers and other characters. Additional specifiers relating with Chinese numerical and zodiac signs are available for Japanese Calendar.

e.g. When output format for Japanese Calendar is specified as ggyK1年(yE)MK1月dK1(dE) , date of 1 April in 2013 is displayed as 平成二五年(癸巳)四月一日(丁酉) .

Format Specifiers

Era

gg In/Out Characters expressing era are interpreted of displayed. Specifier gg have to be used with specifier yyyy, yy, y or ya (input only) for year.
Input: Eras of both the Southern (including Daikakuji-tō 大覚寺統) and the Northern Courts (including Jimyōin-tō 持明院統) are acceptable. Characters of "天皇" (or "皇后") in era name can be omitted (e.g. "神武" is interpreted as era name "神武天皇"). When 紀元 or 皇紀 appears as era name in the input text, expression of the year is interpreted as Japanese imperial year.
Output: When 紀元 or 皇紀 appears as era name in the input text, expression of the year is interpreted as Japanese imperial year.

Year

yyyy In/Out A four digits number expressing year is interpreted or displayed. +-sign is not acceptable.
Input: A less than three digits number is not acceptable. Add 0 to the top when the year number is less than 999.
Output: When the year number is less than 999, add 0s to the top.
yy In/Out A two digits number expressing year is interpreted or displayed. +-sign is not acceptable.
Input: A one digit number is not acceptable. Add 0 to the top when the year number is less than 9. A more than three digits number is interpreted until non-digit character appears.
Output: Only lower two digits are displayed even though the year is more than 100. When the number is less than 10, 0 is added to the top.
y In/Out A number expressing year is interpreted or displayed. A number expressed according to yyyy or yy format (e.g. 03) is also acceptable.
Input: Characters are interpreted as the year until non-digit character appears.
Output: A number expressing the year is displayed as it is.
yE In/Out Zodiac sign (甲子, 乙丑, 丙寅, 丁卯...) expressing year is interpreted or displayed.
yJ In/Out A number expressing Japanese imperial year is interpreted or displayed.
yW In/Out A number expressing year which is simply replaced to year in Julian / Gregorian Calendar from year in Japanese Calendar, is interpreted or displayed. This year number is not necessarily equal to actual year in Julian / Gregorian Calendar.
yK In/Out Chinese numerical expressing year is interpreted or displayed.
Input: The specifier yK functions as a wildcard for interpretation, and shows any Chinese numerical.
Output: The same function of specifier yk1.
yK1 Out The following type of Chinese numerical expressing year is displayed.
一, ..., 一〇, 一一, ..., ニ〇, 二一, ..., 三〇, 三一
yK1b Out The following type of Chinese numerical expressing year is displayed. Function is the same as yK1, but "一" is replaced to "元"
元, ..., 一〇, 一一, ..., ニ〇, 二一, ..., 三〇, 三一
yK2 Out The following type of Chinese numerical expressing year is displayed.
一, ..., 十, 十一, ..., ニ十, 二十一, ..., 三十, 三十一
yK2b Out The following type of Chinese numerical expressing year is displayed. Function is the same as yK2, but "一" is replaced to "元"
元, ..., 十, 十一, ..., ニ十, 二十一, ..., 三十, 三十一
yK3 Out The following type of Chinese numerical expressing year is displayed.
一, ..., 十, 十一, ..., 廿, 廿一, ..., 卅, 卅一
yK3b Out The following type of Chinese numerical expressing year is displayed. Function is the same as yK3, but "一" is replaced to "元"
元, ..., 十, 十一, ..., 廿, 廿一, ..., 卅, 卅一
ya In ya is a wildcard character for interpretation, and shows characters to match specifier y, yE, yJ, yW or yK.

Month

MMMM In/Out Characters expressing month name (1月, 2月...11月, 12月) is interpreted or displayed. Leap month is added "閏" to the top (e.g. "閏1月").
MMMM0 Out The function is the same as specifier MMMM, but the number expression is fixed as two digit numerical (e.g. 01月、02月...11月、12月).
MMM In/Out Characters expressing abbreviated month name (1, 2...11, 12) is interpreted or displayed. Leap month is added "閏" to the top (e.g. "閏1").
MMM0 Out The function is the same as specifier MMM, but the number expression is fixed as two digit numerical (e.g. 01、02...11、12).
MM In/Out A two digits number expressing month is interpreted or displayed. This specifier is not appropriate for Japanese Calendar, though it is prepared to maintain compatibility between calendars. Please use specifier MMM0 instead of specifier MM.
M In/Out A number expressing month is interpreted or display. This specifier is not appropriate for Japanese Calendar, though it is prepared to maintain compatibility between calendars. Please use specifier MMM instead of specifier M.
MJ In/Out Japanese month name (睦月, 如月, 弥生, 卯月...) is interpreted or display.
MK In/Out Chinese numerical expressing month is interpreted or displayed.
Input: The specifier MK functions as a wildcard for interpretation, and shows any Chinese numerical.
Output: The same function of specifier MK1.
MK1 Out The following type of Chinese numerical expressing month is displayed.
一, ..., 一〇, 一一, 一二
MK1b Out The following type of Chinese numerical expressing year is displayed. Function is the same as MK1, but "一" is replaced to "正".
正, ..., 一〇, 一一, 一二
MK2 Out The following type of Chinese numerical expressing month is displayed.
一, ..., 十, 十一, 十二
MK2b Out The following type of Chinese numerical expressing year is displayed. Function is the same as MK2, but "一" is replaced to "正".
正, ..., 十, 十一, 十二
Ma In Ma is a wildcard character for interpretation, and shows characters to match specifier MMMM, MMM, MJ or MK.

Day of Month

dd In/Out A two digits number expressing day of month is interpreted or displayed.
Input: Only a two digit number is acceptable. Add 0 to the top, when the day number is less than 9.
Output: A two digits number is displayed. When the day number is less than 9, 0 is added to the top.
d In/Out A number expressing day of month is interpreted or displayed.
入力: Up to two characters are interpreted as the day number, if the characters are digit.
出力: Day number is displayed as it is.
dE In/Out Zodiac sign (甲子, 乙丑, 丙寅, 丁卯...) expressing day of month is interpreted or displayed.
dK In/Out Chinese numerical expressing day of month is interpreted or displayed.
Input: The specifier dK functions as a wildcard for interpretation, and shows any Chinese numerical.
Output: The same function of specifier dk1.
dK1 Out The following type of Chinese numerical expressing day of month is displayed.
一, ..., 一〇, 一一, ..., ニ〇, 二一, ..., 三〇, 三一
dK1b Out The following type of Chinese numerical expressing day of month is displayed. Function is the same as dK1, but "一" is replaced to "朔", and the last day in the month is replaced to "晦".
朔, ..., 一〇, 一一, ..., ニ〇, 二一, ..., 晦
dK2 Out The following type of Chinese numerical expressing day of month is displayed.
一, ..., 十, 十一, ..., ニ十, 二十一, ..., 三〇, 三一
dK2b Out The following type of Chinese numerical expressing day of month is displayed. Function is the same as dK2, but "一" is replaced to "朔", and the last day in the month is replaced to "晦".
朔, ..., 十, 十一, ..., ニ十, 二十一, ..., 晦
dK3 Out The following type of Chinese numerical expressing day of month is displayed.
一, ..., 十, 十一, ..., 廿, 廿一, ..., 卅, 卅一
dK3b Out The following type of Chinese numerical expressing day of month is displayed. Function is the same as dK2, but "一" is replaced to "朔", and the last day in the month is replaced to "晦".
朔, ..., 十, 十一, ..., 廿, 廿一, ..., ..., 晦
da In da is a wildcard character for interpretation, and shows characters to match specifier d, dE or dK.

Other Specifiers

* Input * is a wildcard character for interpretation, and shows any characters or null (equal to .* in regular expression). Characters in the entered text string are skipped until characters which match to the next specifier appear. This specifier cannot be placed top of the format.
? In ? is a wildcard character for interpretation, and shows any one character. This specifier cannot be placed top of the format.
" In/Out Characters quoted with " do not work as specifiers, and interpreted or displayed as the characters themselves. " itself can be expressed as '"' or \".
' In/Out Characters quoted with ' do not work as specifiers, and interpreted or displayed as the characters themselves. ' itself can be expressed as "'" or \'.
\ In/Out \ is an escape character. A character after \ do not work as specifiers, and interpreted or displayed as the character itself. \ itself can be expressed as \\.