Era setting (JP version only)

PowerBuilder and PowerServer have the following differences when dealing with the era settings for date format.

  • In the Japanese version 2017 and 2019, PowerBuilder always reads the Windows registry to display the date format. The era settings in the GENGOJPN.INI file will be ignored.

    The Windows registry key is Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Calendars\Japanese\Eras.

  • In the Japanese version 2017 MR and 2019 MR, PowerServer Web (Web only, no Mobile) can also read the Windows registry to display the date format. However, if the GENGOJPN.INI file is detected, then the era settings in GENGOJPN.INI will take precedence over the settings in the Windows registry.

    The priority for era settings to take effect in PowerServer Web is: INI file > Windows registry > hard code; the priority in PowerServer Mobile is: INI file > hard code.

  • For PowerServer Web/Mobile to support the era setting in GENGOJPN.INI, the GENGOJPN.INI file will need to be deployed to PowerServer via the PowerServer Toolkit first.

How the INI file settings are interpreted in PowerServer Web/Mobile:

  • Every era definition must contains four parts, respectively: era, abbreviation, start date, and end date (for example, 仮壱,NN,20190501,21171230)

  • The setting of the last era can be ended with or without “;”, but cannot be ended with some other special character.

  • Actually the program will ignore the setting of the end date, it would use the start date minus one of the next era as the end date of the current era. The end date of the last era will be taken as 99991231. And to be compatible with the earlier versions, the end date must be specified in the required format.

How the registry settings are interpreted in PowerServer Web:

  • Since there is no end date for each era, the start date minus one of the next era will be taken as the end date of the current era (such as 99991231). This is the same behavior as PowerBuilder.

  • The end of date of the last era will be 99991231. This is different from PowerBuilder, because in PowerBuilder, the end date of the last era is the last day in the start year of the last era plus 99 years. For example, if the start date of the last era is 20190501, the end date of the era 令和 is 21171231. Therefore, the date 20180101 will be shown as “??” in PowerBuilder, but shown as 令和 in PowerServer Web.