title: Parsing a week string to Time (YYYY-W#)
body: <p>I'm trying to parse a week string that an HTML5 input with a type of "week" may return, into an actual Date or Time in ruby.</p>
  
  <p>An input will return a string like this: "2014-W05", where W05 is the fifth week of the year.</p>
  
  <p>Here is what I tried:</p>
  
  <pre><code>2.1.0dev :057 &gt; Time.strptime("2014-W05", "%Y-W%V")
  2014-01-01 00:00:00 -0800
  2.1.0dev :058 &gt; Date.strptime("2014-W05", "%Y-W%V")
  2014-01-01
  2.1.0dev :058 &gt; DateTime.strptime("2014-W05", "%Y-W%V")
  Wed, 01 Jan 2014 00:00:00 +0000
  </code></pre>
  
  <p>As per the documentation: <a href="http://apidock.com/ruby/DateTime/strftime" rel="nofollow">http://apidock.com/ruby/DateTime/strftime</a></p>
  
  <p>%V - Week number of the week-based year (01..53)</p>
  
  <p>Thanks for your help!</p>