System.Threading.Thread.CurrentThread.CurrentCulture.Calendar.GetWeekOfYear() return values that are not compatible with ISO 8601 and date Unix utility in some edge cases.
ISO related link
The issue was discovered in PowerShell repo PowerShell/PowerShell#6542 (You should use the build if you want tests with PowerShell Core Get-Date cmdlet).
If it is on a Sunday, it is part of week 52 of the previous year.
#'2017-01-01' is 'Sunday, January 1, 2017 12:00:00 AM'
date -d 2017-01-01 +%V #return 52 - right
Get-date 2017-01-01 -UFormat "%V" #return 1 - bug
If 31 December is on a Monday, Tuesday or Wednesday, it is in week 01 of the next year.
#'2007-12-31' is 'Monday, December 31, 2007 12:00:00 AM'
date -d 2011-12-31 +%V #return 01 - right
Get-date 2011-12-31 -UFormat "%V" #return 53 - bug
System.Threading.Thread.CurrentThread.CurrentCulture.Calendar.GetWeekOfYear()return values that are not compatible with ISO 8601 anddateUnix utility in some edge cases.ISO related link
The issue was discovered in PowerShell repo PowerShell/PowerShell#6542 (You should use the build if you want tests with PowerShell Core
Get-Datecmdlet).#'2017-01-01' is 'Sunday, January 1, 2017 12:00:00 AM'
date -d 2017-01-01 +%V #return 52 - right
Get-date 2017-01-01 -UFormat "%V" #return 1 - bug
#'2007-12-31' is 'Monday, December 31, 2007 12:00:00 AM'
date -d 2011-12-31 +%V #return 01 - right
Get-date 2011-12-31 -UFormat "%V" #return 53 - bug