Skip to content

Conversation

@tarekgh
Copy link
Member

@tarekgh tarekgh commented Dec 4, 2021

Fixes #61708

This change fixes two issues with the parser:

  • ICU provide some DateTime formatting patterns for BiDi cultures which include the Unicode Right-toLeft mark U+200F. This mark mainly helps when displaying the formatted date and time but it doesn't have any effect on the values or the separators. Our DateTime parser was not recognizing such mark and fails with any date/time strings containing such mark. This fix is addressing that by skipping this mark during the parse operation.
  • Some cultures like dz-BT started formatting time with space separators. Something like 10 30 PM. The parser was failing with such case too and this change is fixing it.

@ghost
Copy link

ghost commented Dec 4, 2021

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Dec 4, 2021

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

Issue Details

Fixes #61708

This change fixes two issues with the parser:

  • ICU provide some DateTime formatting patterns for BiDi cultures which include the Unicode Right-toLeft mark U+200F. This mark mainly helps when displaying the formatted date and time but it doesn't have any effect on the values or the separators. Our DateTime parser was not recognizing such mark and fails with any date/time strings containing such mark. This fix is addressing that by skipping this mark during the parse operation.
  • Some cultures like dz-BT started formatting time with space separators. Something like 10 30 PM. The parser was failing with such case too and this change is fixing it.
Author: tarekgh
Assignees: -
Labels:

area-System.Runtime

Milestone: -

@tarekgh tarekgh self-assigned this Dec 4, 2021
@tarekgh tarekgh modified the milestones: .NET 7.0, 7.0.0 Dec 4, 2021
@tarekgh tarekgh requested a review from safern December 4, 2021 00:04
@safern safern merged commit bddd369 into dotnet:main Dec 7, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jan 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DateTime.ToString("d") cannot be parsed as a DateTime in Arabic

3 participants