- Notifications
You must be signed in to change notification settings - Fork 8.1k
#4750 Fix Get-Date -UFormat %u behavior#14549
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
brianary commented Jan 5, 2021 • edited by iSazonov
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by iSazonov
Uh oh!
There was an error while loading. Please reload this page.
ghost commented Jan 5, 2021 • edited by ghost
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by ghost
Uh oh!
There was an error while loading. Please reload this page.
brianary commented Jan 6, 2021
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 resolvedHide resolved
Uh oh!
There was an error while loading. Please reload this page.
| 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)?
brianaryJan 6, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
ghost commented Jan 14, 2021
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
brianary commented Jan 15, 2021
Let me know if there's anything further I can provide. |
iSazonov commented Jan 15, 2021
@brianary Since it is a breaking change I ask PowerShell Committee to approve. |
SteveL-MSFT commented Jan 20, 2021
@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. |
brianary commented Jan 24, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@SteveL-MSFT should #14555 also be taken with this one, since they are so tightly related? |
iSazonov commented Jan 25, 2021
@brianary Please create new issue in PowerShell-Doc repository and add a reference to the issue in the PR description. |
ghost commented Feb 2, 2021
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 resolvedHide resolved
Uh oh!
There was an error while loading. Please reload this page.
iSazonov commented Feb 3, 2021
@brianary Please rebase. I hope after that CI-Windows will pass. |
…DateCommand.cs Co-authored-by: Robert Holt <[email protected]>
iSazonov commented Feb 4, 2021
@brianary Thanks for your contribution! |
ghost commented Feb 12, 2021
🎉 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,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.