元年 vs 1年 (Gannen vs Ichinen) with the 令和 Reiwa Era


In my previous post I showed how to use the Registry to enable the new 令和 Reiwa Era for the Japanese Calendar. Some customers have asked how to also display the 元年 (Gannen) for the first year.

For current versions of Windows, we have set a registry value to select 1年 (Ichinen). You can remove this registry value to enable the 元年 (Gannan).

The value that is selecting the Ichinen behavior is:

[Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Calendars\Japanese]
"InitialEraYear"="1年"

So that value need to be removed for Gannen (元年) support. Note that part of the reason we left it as Ichinen (1年) was a concern for the ability for all applications to support the Gannen properly, if your applications have difficulty with the Gannen, you may need to reapply the above value.

A command line to remove the value:

reg delete HKLM\SYSTEM\CurrentControlSet\Control\Nls\Calendars\Japanese /v InitialEraYear /f

If you want to add the Reiwa Era and enable the Gannen behavior with a single registry file, you can use this example:

Windows Registry Editor Version 5.00

; Remove any existing test data
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Calendars\Japanese]

; Set first year to 元年 or 1年 (元年 is the default if not present)
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Calendars\Japanese]
"InitialEraYear"="元年"

; Restore the era data, including 令和 (Reiwa)
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Calendars\Japanese\Eras]
"1868 01 01"="明治_明_Meiji_M"
"1912 07 30"="大正_大_Taisho_T"
"1926 12 25"="昭和_昭_Showa_S"
"1989 01 08"="平成_平_Heisei_H"
"2019 05 01"="令和_令_Reiwa_R"

Enable-Reiwa-and-Gannen

Again, note that some applications may not be able to properly handle the 元年 (Gannen), in which case the 1年 reg value at the top of this post would need to be re-added to the machine.


Comments (0)

Skip to main content