Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Support new Japanese calendar eras #20727

Merged
merged 1 commit into from
Nov 12, 2018
Merged

Commits on Oct 31, 2018

  1. Support new Japanese calendar eras

    Japan is going to introduce the new era next year 2019, this new era will be added to the Japanese calendar. This new era would affect anyone converting, formatting or parsing dates using the Japanese calendar.
    Users who formatted future dates before introducing the new era and then try to parse these dates after introducing the new era will fail and get parsing exception. The reason is the year number will not be valid in the old era anymore because the new era set a year limit to the old era.
    
    Here is an example:
    
    Format a date like "平成 32年2月1日" which saying year 32 in the era "平成". after we introduce the new era, the old era "平成" will be limited up to and including year 31 so year 32 is exceeding the era end.
    
    The fix is to allow the parser succeeds with such dates and have a config switch which can be used to for anyone want the old behavior.
    tarekgh committed Oct 31, 2018
    Configuration menu
    Copy the full SHA
    e2a2114 View commit details
    Browse the repository at this point in the history