title: How to get month in MM and date in dd format in nodejs
body: <p>I am coding in NodeJs and have to create a filename which have date and time appended. The format should be "metadata_yyymmdd_his.json". I am struggling to get the date in dd and month in MM format. 
  Below is the code that I have written as of now.</p>
  
  <pre><code>const dateObj = new Date();
  
  const month = (`0${dateObj.getUTCMonth() + 1}`).slice(-2);
  
  const date = (`0${dateObj.getUTCDate()}`).slice(-2);
  
  const metadataFileName = 'metadata_' + dateObj.getUTCFullYear() + month + date + "_" + dateObj.getUTCHours() + dateObj.getUTCMinutes() + dateObj.getSeconds() + '.json'
  </code></pre>
  
  <p>How can I get the date and month prepended with 0 if it is single digit? 
  EX: if month is April then the result should be 04</p>