title: Change display:none based on date
body: <p>I am building a site to be used locally on my tablet, I don't want to us php.</p>
  
  <p>I have several divs that need to be displayed on different days.
  IE:
  div 1 displays today
  div 2 displays tomorrow
  div 3 displays the next day
  etc...
  This is the code I have to change content based on date but this isn't what I want to do. How can I modify the code to change the display (I am a complete noob at js code):</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var date=new Date();
  var year=date.getFullYear();
  var month=date.getMonth();
  var day=date.getDate(); // fixed
  function SetDivContent() {
      var div=document.getElementById('date_dependent');
      if (year==2014 &amp;&amp; month==00) { // fixed (the JavaScript months order is 0-11, not 1-12)
          if (day&gt;=3 &amp;&amp; day&lt;29) { // the following content will be displayed 12/03/2010, 12/04/2010, [...], 12/09/2010, 12/10/2010
              div.innerHTML='content 1';
          }
          else if (day==11 || day==12) { // this one will be displayed 12/11/2010 and 12/12/2010
              div.innerHTML='content 2';
          }
          else if (day&gt;12) { // this one - 12/13/2010 and later, until the end of December
              div.innerHTML='content 3';
          }
      }
      else if (year==2014 &amp;&amp; month&gt;=0) div.innerHTML='Time to start over!!!'; // OPTIONAL - just to ensure that content 3 is displayed even after December.
  }
  &lt;/script&gt;
  </code></pre>