title: javascript countdown with year , month , day
body: <p>I am trying to make a countdown with javascript. However, my countdown can only calculate days, hours, minutes and seconds. I also want to display years and months.</p>
  
  <p>The following is my code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
          today = new Date();
  
          BigDay = new Date("December 25, 2016");
          msPerDay = 24 * 60 * 60 * 1000;
          timeLeft = (BigDay.getTime() - today.getTime());
          e_daysLeft = timeLeft / msPerDay;
          daysLeft = Math.floor(e_daysLeft);
          e_hrsLeft = (e_daysLeft - daysLeft) * 24;
          hrsLeft = Math.floor(e_hrsLeft);
          minsLeft = Math.floor((e_hrsLeft - hrsLeft) * 60);
          // $("#countdown").append("There are only&lt;BR&gt; &lt;H4&gt;" + daysLeft + " days " + hrsLeft + " hours and " + minsLeft + " minutes left &lt;/H4&gt; Until December 25th 2020&lt;P&gt;");
          document.write(daysLeft + " days " + hrsLeft + " hours" + minsLeft + " minutes");
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I would like to output:</p>
  
  <blockquote>
    <p><em>x</em> Years, <em>y</em> Months, <em>z</em> Days left.</p>
  </blockquote>