Reiwa era not supported for Calendar add/set before 2019-05-01; overflow issues for eras beyond

Description

For Japanese calendar: With removal of the named=false attribute for Reiwa era in CLDR 35.1, many aspects of Reiwa era handling are supported in current 64.2 even if the system date is before 2019-05-01 (for example date formatting). However, some aspects of era handling are currently implemented to not support Reiwa until the system date is 2019-05-01; for example if the current date is in the Heisei era, then a Calendar::add for ERA with amount 1 will not actually advance the date into the Reiwa era start year. This leads to some behavior inconsistencies. We should allow Calendar::add and set to support all valid eras (those for which named=false is not set).

Furthermore (and this is an old problem), Calendar::set to an era beyond the current era does not necessarily produce a UDate that is beyond the current era, due to some date value overflow problems.

Our issue rdar://49714633

Fixed

Assignee

Peter Edberg

Reporter

Peter Edberg

Components

Labels

Reviewer

None

Priority

blocks-release

Time Needed

Hours

Fix versions

Configure