title: JavaScript getMonth
body: <p>I am trying to use JavaScript to display the date and time on my webapp. </p>
  
  <p>Although I have had success doing this my date and time is printed as 29/5/13. I want it to have a zero in front of the month if it is less than ten. I have tried using an if statement but didnt have much sucess. My code that I currently have is:</p>
  
  <pre><code>&lt;script language="javascript"&gt; 
  
      today = new Date(); 
      document.write("&lt;BR&gt;Time: ", today.getHours(),":",today.getMinutes()); 
      document.write("&lt;BR&gt;Date: ", today.getDate(),"/",today.getMonth()+1,"/",today.getYear()-100);
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>