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

Conversation

tarekgh
Copy link
Member

@tarekgh tarekgh commented Oct 31, 2018

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.

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 tarekgh added this to the 2.1.x milestone Oct 31, 2018
@tarekgh
Copy link
Member Author

tarekgh commented Oct 31, 2018

@dotnet-bot test this please

@tarekgh tarekgh added the Servicing-consider Issue for next servicing release review label Nov 1, 2018
@tarekgh
Copy link
Member Author

tarekgh commented Nov 1, 2018

#20729

@tarekgh
Copy link
Member Author

tarekgh commented Nov 1, 2018

@vivmishra
Copy link

Approved for 2.1.7

@vivmishra vivmishra added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Nov 6, 2018
@danmoseley
Copy link
Member

Hold on merging for a few days until 2.1.6 has completely left the station (shooting for Monday per @leecow )

This should still flow into 2.2.0.

@tarekgh tarekgh merged commit eb90b6c into dotnet:release/2.1 Nov 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants