-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
#4750 Fix Get-Date -UFormat %u behavior #14549
Conversation
I can't really access the details, but the test failures appear to be unrelated. |
src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetDateCommand.cs
Outdated
Show resolved
Hide resolved
It "using -uformat 'u' produces the correct output" -TestCases @( | ||
@{date="1998-01-02"; dayOfWeek = "5"}, | ||
@{date="1998-01-03"; dayOfWeek = "6"}, | ||
@{date="2003-01-03"; dayOfWeek = "5"}, | ||
@{date="2004-01-02"; dayOfWeek = "5"}, |
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.
Please clarify how you select the test values (whole list)?
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.
I just used the values from the previous test for %V, which is related, then added a couple recent dates that had led to discovering the bug. I'll add a comment to that effect, or else select some other dates.
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
Let me know if there's anything further I can provide. |
@brianary Since it is a breaking change I ask PowerShell Committee to approve. |
@PowerShell/powershell-committee reviewed this, we agreed that this is a bug that should be fixed and this is likely a bucket 3 compatibility issue. |
@SteveL-MSFT should #14555 also be taken with this one, since they are so tightly related? |
@brianary Please create new issue in PowerShell-Doc repository and add a reference to the issue in the PR description. |
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetDateCommand.cs
Outdated
Show resolved
Hide resolved
@brianary Please rebase. I hope after that CI-Windows will pass. |
…DateCommand.cs Co-authored-by: Robert Holt <rjmholt@gmail.com>
@brianary Thanks for your contribution! |
🎉 Handy links: |
PR Summary
Corrects the behavior of %u in Get-Date -UFormat to match ISO 8601.
PR Context
This is to fix one of the format issues in #4750.
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.