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

[release/8.0][mono][HybridGlobalization] Fix ShortDatePattern year format to be "yyyy" #100810

Conversation

matouskozak
Copy link
Member

@matouskozak matouskozak commented Apr 9, 2024

Customer Impact

  • Customer reported
  • Found internally

When using Hybrid Globalization mode on Apple mobile platforms with .NET 8, we are returning ShortDatePattern in ICU-like format instead of .NET-like format. This PR fixes this by normalizing the short date format returned from Apple ICU and converting "yy" year format to the expected "yyyy"

Hybrid Globalization mode in .NET 8 is off by default, so this only affects applications where the developer explicitly opted into using this mode.

NOTE: This is a .NET 8 version of #99908.

Regression

  • Yes - only when user opts into hybrid globalization
  • No

Testing

We added a small set of tests to verify the correct functionality of the fix.

Risk

Low, only affects scenarios where Hybrid Globalization mode on Apple mobile platforms is enabled.


fyi: @vitek-karas @mkhamoyan @ilonatommy @akoeplinger @steveisok

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-globalization
See info in area-owners.md if you want to be subscribed.

@matouskozak
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@matouskozak matouskozak marked this pull request as ready for review April 9, 2024 19:02
@vitek-karas vitek-karas added the Servicing-consider Issue for next servicing release review label Apr 10, 2024
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. we will take for consideration in 8.0.x

@jeffschwMSFT jeffschwMSFT added this to the 8.0.x milestone Apr 16, 2024
@vitek-karas vitek-karas changed the title [mono][HybridGlobalization] Fix ShortDatePattern year format to be "yyyy" [release/8.0][mono][HybridGlobalization] Fix ShortDatePattern year format to be "yyyy" Apr 16, 2024
@vitek-karas vitek-karas added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Apr 16, 2024
@jeffschwMSFT
Copy link
Member

@vitek-karas can you take a look at the CI failures?

@matouskozak
Copy link
Member Author

Failures are known as the same tests can be found failing on a combination of https://dev.azure.com/dnceng-public/public/_build/results?buildId=642490&view=results, https://dev.azure.com/dnceng-public/public/_build/results?buildId=641494&view=logs&j=12cf7a0b-4da0-5b17-37e7-24aa7cbf9869, or https://dev.azure.com/dnceng-public/public/_build/results?buildId=638193

One exception is Microsoft.Bcl.Cryptography.Tests failing on tvos-arm64 Release AllSubsets_Mono that I didn't find failing anywhere else on release/staging-8.0. However, the error doesn't seem to be related to this PR. I will re-run the tests to confirm.

@matouskozak
Copy link
Member Author

matouskozak commented Apr 18, 2024

Failures are known as the same tests can be found failing on a combination of https://dev.azure.com/dnceng-public/public/_build/results?buildId=642490&view=results, https://dev.azure.com/dnceng-public/public/_build/results?buildId=641494&view=logs&j=12cf7a0b-4da0-5b17-37e7-24aa7cbf9869, or https://dev.azure.com/dnceng-public/public/_build/results?buildId=638193

One exception is Microsoft.Bcl.Cryptography.Tests failing on tvos-arm64 Release AllSubsets_Mono that I didn't find failing anywhere else on release/staging-8.0. However, the error doesn't seem to be related to this PR. I will re-run the tests to confirm.

Took a second look after re-run and all failing tests seem unrelated and are already present on the release/8.0-staging branch.

@matouskozak matouskozak merged commit 47afa79 into dotnet:release/8.0-staging Apr 18, 2024
235 of 256 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 19, 2024
@matouskozak matouskozak deleted the hybrid-globalization/short-date-year-format_backport branch October 3, 2024 13:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants