title: Retrieve the last day of the year in javascript
body: <p>Today it's 06/11/2012.
  I need retrieve the last day of the current year using javascript.</p>
  
  <pre><code>function getLastDayOfYear(date)
  {
      var x = document.getElementById("demo");
  
      var year = date.getFullYear();
      var month = date.getMonth();
      var day = 0; // ?????
  
      x.innerHTML = day + "-" + month + "-" + year;
  }  
  </code></pre>
  
  <p>Is there any function that retrieve it done, or must i do a full implementation?
  If i need to implement this, could anyone help me out ?</p>
  
  <p>I made a simple fiddle you can check here: <a href="http://jsfiddle.net/EyzCD/" rel="noreferrer">http://jsfiddle.net/EyzCD/</a></p>