title: Get Approximate Date from Week Number
body: <p>I'm getting information on monitors from WMI. There are properties called "WeekOfManufacture" and "YearOfManufacture". In this case it's:</p>
  
  <pre>
  Week : 24
  Year : 2009
  </pre>
  
  <p>I'm trying to get the approximate date corresponding to that.</p>
  
  <p>I'm doing this to get a really rough estimate:</p>
  
  <pre><code>(Get-Date -Date $YearOfManufacture/01/01).AddDays(7*$WeekOfManufacture)
  </code></pre>
  
  <p>But obviously the "week" doesn't necessarily always have 7 days.</p>
  
  <p>What is the best approach?</p>
  
  <p>The complete code I'm using right now is:</p>
  
  <pre><code>$Monitors = Get-WmiObject WmiMonitorID -Namespace root\wmi
  
  foreach ($Monitor in $Monitors) {
      $Manufacturer = ($Monitor.ManufacturerName -notmatch 0 | ForEach{[char]$_}) -join ""
      $Code = ($Monitor.ProductCodeID -notmatch 0 | ForEach{[char]$_}) -join ""
      $Name = ($Monitor.UserFriendlyName -notmatch 0 | ForEach{[char]$_}) -join ""
      $Serial = ($Monitor.SerialNumberID -notmatch 0 | ForEach{[char]$_}) -join ""
  
      $WeekOfManufacture = $Monitor.WeekOfManufacture
      $YearOfManufacture = $Monitor.YearOfManufacture
  
      $DateManufacture = (get-date -Date $YearOfManufacture/01/01).AddDays(7*$WeekOfManufacture)
  
      "$Manufacturer - $Code - $Name - $Serial - $DateManufacture" 
  }
  </code></pre>
  
  <p>which returns something like (info obfuscated):</p>
  
  <pre>
  SAM - 1234 - SycMastr - XXXX - 06/18/2009 00:00:00
  SAM - 1234 - SycMastr - XXXX - 09/10/2009 00:00:00
  </pre>