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

This post has been republished via RSS; it originally appeared at: MSDN Blogs.

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:

[ComputerHKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlNlsCalendarsJapanese]
"InitialEraYear"="1年"

So that value need to be removed.

reg delete HKLMSYSTEMCurrentControlSetControlNlsCalendarsJapanese /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_MACHINESYSTEMCurrentControlSetControlNlsCalendarsJapanese]

; Set first year to 元年 or 1年 (元年 is the default if not present)
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlNlsCalendarsJapanese]
"InitialEraYear"="元年"

; Restore the era data, including 令和 (Reiwa)
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlNlsCalendarsJapaneseEras]
"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

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.