[WinUI] Fix DateTimeFormatter for "ddd"#20045
Merged
Merged
Conversation
jsuarezruiz
reviewed
Jan 22, 2024
| [InlineData("dd/MM/yyyy", "{day.integer(2)}/{month.integer(2)}/{year.full}")] | ||
| [InlineData("d/M/yy", "{day.integer}/{month.integer(1)}/{year.abbreviated}")] | ||
| [InlineData("ddd/MMM/yyyy", "{day.integer} {dayofweek.abbreviated}/{month.abbreviated}/{year.full}")] | ||
| [InlineData("ddd/MMM/yyyy", "{dayofweek.abbreviated}/{month.abbreviated}/{year.full}")] |
Contributor
There was a problem hiding this comment.
The test previously passed with
[InlineData("ddd/MMM/yyyy", "{day.integer} {dayofweek.abbreviated}/{month.abbreviated}/{year.full}")]
?
Should we validate the resulting string as well or include a different test?
Contributor
Author
There was a problem hiding this comment.
This test validates that the input string gets translated to the expected output, which should be what I changed it to here (hence why I did). So to validate the existing string, it would be a new test to validate that the previous string that was there ({day.integer} {dayofweek.abbreviated}) is incorrect, so we don't regress it when making changes.
I'm not sure how important that is, but I'm not against doing it.
Member
|
/rebase |
7ffccfe to
52b9fd8
Compare
mattleibow
approved these changes
Jun 6, 2024
Member
|
/rebase |
52b9fd8 to
6f4ed24
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
The WinUI controller for DatePicker uses a CalendarDatePicker. That uses a special Windows Globalization format, which included the day and abbreviated day for
ddd. Going by that doc, that's wrong. It should only be the abbreviated date.Issues Fixed
Fixes #19967