title: Display 9 day numbers with JS
body: <p>I'm trying to display 9 day numbers with js.</p>
  
  <p>With PHP it will look like this:</p>
  
  <pre><code>for($i = 0; $i &lt; 4; $i++){
      $date = new DateTime();
      $date-&gt;sub(new DateInterval('P'.(4 - $i).'D'));
      echo '&lt;span class="day_nr"&gt;'.$date-&gt;format('d').'&lt;/span&gt;';
  }
  
  $date = new DateTime();
  echo '&lt;span class="selected_day_nr day_nr"&gt;'.$date-&gt;format('d').'&lt;/span&gt;';
  
  for($i = 1; $i &lt; 5; $i++){
      $date = new DateTime();
      $date-&gt;add(new DateInterval('P'.$i.'D'));
      echo '&lt;span class="day_nr"&gt;'.$date-&gt;format('d').'&lt;/span&gt;';
  }
  </code></pre>
  
  <p>This is what i have found in JS:</p>
  
  <pre><code>var date = new Date();
  date.setDate(date.getDate() + 1); console.log(date)
  </code></pre>
  
  <p>But this will show the whole date like: Wed Feb 21 2018 11:23:30 GMT+0100 (CET)</p>
  
  <p>How do i display it with only the day number? (21)</p>