title: Converting a string for DateTime usage using sprintf formatting
body: <p>I'm trying to figure out a way how to take a string and be able to use it in a DateTime. This is an example (obviously giving an error because of incorrect parameters):</p>
  
  <pre><code>$string = sprintf('strtotime("second monday of october", mktime(0, 0, 0, 10, 1, %d))', 2014);
  $date = DateTime::createFromFormat('Y-m-d', $string);
  echo $date-&gt;format('Y-m-d');
  </code></pre>
  
  <p>The reason why I want to achieve this is to be able to have the year be determined by other factors depending where it is located in my class: meaning that <code>$string</code> will be created on the fly and will be used later to output a date. My question, is there an alternative to this or is it just not possible and the year <strong>must</strong> be pre-determined. Any hand would be appreciated.</p>