title: JavaScript format number to day with always 3 digits
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1267283/how-can-i-create-a-zerofilled-value-using-javascript">How can I create a Zerofilled value using JavaScript?</a>  </p>
  </blockquote>
  
  
  
  <p>I have to output a day number that must always have 3 digits. Instead of <strong>3</strong> it must write <strong>003</strong>, instead of <strong>12</strong> it must write <strong>012</strong>. If it is greater than <strong>100</strong> output it without formatting.
  I wonder if there's a regex that I could use or some quick in-line script, or I must create a function that should do that and return the result. Thanks!</p>