When eras change, calling a date and time instantiation method that relies on the default era can produce an ambiguous date. In the example below, the call to the JapaneseCalendar.ToDateTime method that uses the default era returns different dates depending on whether or not the new era has been defined in the registry.

Use speific era when creating DateTime and DateTimeOffset structs from previously stored date in Japanese calendar

Don't store dates in Japanese format

Don't use hard-coded era start date for date calculations converting dates from Japanese date format

Use JapaneseCalendar class for date formatting only

This example demonstrates the dangers of using current year assumptions in Japanese date conversions

  • Handling a new era in the Japanese calendar in .NET.
  • The Japanese Calendar's Y2K Moment.
  • Era Handling for the Japanese Calendar.
  • List of Japanese Eras (Wikipedia)