Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtracting 1-year from date during Reiwa 1 yields unexpected results. #471

Closed
MicrosoftIssueBot opened this issue Apr 23, 2019 · 2 comments · Fixed by #481
Closed

Subtracting 1-year from date during Reiwa 1 yields unexpected results. #471

MicrosoftIssueBot opened this issue Apr 23, 2019 · 2 comments · Fixed by #481

Comments

@MicrosoftIssueBot
Copy link
Collaborator

MicrosoftIssueBot commented Apr 23, 2019

Describe the bug
When using Japanese era globalization settings, adding/subtracting years can yield unexpected results.

Steps To Reproduce

  1. Set your globalization settings to Japanese and use the Era notation for Calendar format
  2. Open calculator and go to date calculation
  3. Switch to add/subtract mode
  4. Set the date to Reiwa 1-nen May 1
  5. Subtract 1 year from that date
  6. Note the result is Heisei 31-nen Apr 1

Expected behavior

the result should be Heisei 30, May 1
Screenshots

Device and Application Information

  • OS Build: 17763
  • Architecture: x64
  • Application Version:
  • Region:
  • Dev Version Installed:

Additional context

The Japanese Era system can have multiple year partitions within the same year.
For example, April 30, 2019 is denoted April 30, Heisei 31; May 1, 2019 is denoted as May 1, Reiwa 1. The Calendar treats Heisei 31 and Reiwa 1 as separate years, which results in some unexpected behaviors where subtracting a year from Reiwa 1 results in a date in Heisei 31.

@MicrosoftIssueBot MicrosoftIssueBot added needs more info Issue requires more information from poster Pri: 2 triage needed labels Apr 23, 2019
@MicrosoftIssueBot
Copy link
Collaborator Author

This is your friendly Microsoft Issue Bot. I created this issue automatically as requested by a team member.

@EriWong EriWong removed the needs more info Issue requires more information from poster label Apr 23, 2019
EriWong added a commit to EriWong/calculator that referenced this issue Apr 23, 2019
[JaEra] Calc: subtracting 1-year from date during Reiwa 1 yields unexpected results.
@grochocki grochocki changed the title [JaEra] Calc: subtracting 1-year from date during Reiwa 1 yields unexpected results. Subtracting 1-year from date during Reiwa 1 yields unexpected results. Apr 23, 2019
@grochocki grochocki added Area: World-Readiness Bug Issue is a bug triage approved Issue has been approved by Calculator team member and removed triage needed labels Apr 23, 2019
@MicrosoftIssueBot MicrosoftIssueBot added fixed and removed triage approved Issue has been approved by Calculator team member labels Apr 24, 2019
@MicrosoftIssueBot MicrosoftIssueBot added triage needed and removed Bug Issue is a bug fixed labels Apr 25, 2019
@EriWong
Copy link
Contributor

EriWong commented Apr 29, 2019

There is a further issue with how the calendar handles month boundaries. If a year transition happens in the middle of a month, the calendar treats the end of the month as a different month than the beginning of the month.

EriWong added a commit to EriWong/calculator that referenced this issue Apr 29, 2019
Expand fix for ja era to handle months and days
EriWong added a commit to EriWong/calculator that referenced this issue Apr 30, 2019
Expand fix for ja era to handle months and days
EriWong added a commit to EriWong/calculator that referenced this issue Apr 30, 2019
Expand fix for ja era to handle months and days
EriWong added a commit to EriWong/calculator that referenced this issue Apr 30, 2019
Expand fix for ja era to handle months and days
EriWong added a commit to EriWong/calculator that referenced this issue Apr 30, 2019
Expand fix for ja era to handle months and days
EriWong added a commit to EriWong/calculator that referenced this issue Apr 30, 2019
Expand fix for ja era to handle months and days
EriWong added a commit that referenced this issue Apr 30, 2019
Expand fix for ja era to handle months and days
EriWong added a commit to EriWong/calculator that referenced this issue Jun 5, 2019
[JaEra] Calc: subtracting 1-year from date during Reiwa 1 yields unexpected results.
EriWong added a commit to EriWong/calculator that referenced this issue Jun 5, 2019
Expand fix for ja era to handle months and days
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants