title: Php how to go from day of the year to date and vice versa
body: <p>How do you go in php from a nth day in the year to the date like: </p>
  
  <pre><code>getdatefromday(275, 2012) 
  </code></pre>
  
  <p>and it outputs a date (better if an object).</p>
  
  <p>And I'd like to do the opposite too, like <code>getdayoftheyear("21 oct 2012")</code> </p>