-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[WinUI] Fix DateTimeFormatter for "ddd" #20045
Conversation
@@ -12,7 +12,7 @@ public partial class DatePickerHandlerTests | |||
[Theory(DisplayName = "Format Initializes Correctly")] | |||
[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}")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
/rebase |
7ffccfe
to
52b9fd8
Compare
/rebase |
52b9fd8
to
6f4ed24
Compare
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