title: Get Current Date using JS
body: <p>I'm trying to get the current date so I can use it at the ending of this link. My code is almost correct but can't figure out what is going wrong.</p>
  <ul>
  <li><strong>Correct Format Example:</strong>
  **<a href="http://zumdb-prod.itg.com/zum/AppServlet?action=aotool&amp;jspURL=clusterTools/toolset.jsp&amp;fegoaltype=RAW&amp;eedbListName=ZUM_CMP_DNS_CMP_Clean&amp;facility=DMOS5-CLUSTER&amp;monthDate=01/09/2022" rel="nofollow noreferrer">http://zumdb-prod.itg.com/zum/AppServlet?action=aotool&amp;jspURL=clusterTools/toolset.jsp&amp;fegoaltype=RAW&amp;eedbListName=ZUM_CMP_DNS_CMP_Clean&amp;facility=DMOS5-CLUSTER&amp;monthDate=01/09/2022</a></li>
  </ul>
  <p>My results are almost correct but the code returns with the following date 01/0/2022 instead of 01/09/2022</p>
  <p>Can someone help me figure out this small bug?</p>
  <pre><code>&lt;script&gt;
      const getDate = () =&gt; {
          let newDate = new Date();
          let year = newDate.getFullYear();
          let month = newDate.getMonth() + 1;
          let d = newDate.getDay();
          return month + '/' + d + '/' + year;
      }
  
  
  
      document.getElementById('Ao').src =
          'http://zumdb-prod.itg.com/zum/AppServlet?action=aotool&amp;jspURL=clusterTools/toolset.jsp&amp;fegoaltype=RAW&amp;eedbListName=ZUM_CMP_DNS_CMP_Clean&amp;facility=DMOS5-CLUSTER&amp;monthDate='
          .concat(getDate());
  
      document.getElementById('MTD').src =
          'http://zumdb-prod.itg.com/zum/AppServlet?action=aotoolFe&amp;jspURL=clusterTools/toolsetFe.jsp&amp;fegoaltype=RAW&amp;eedbListName=ZUM_DIFF_TEL_IPD_HTO&amp;facility=DMOS5-CLUSTER&amp;monthDate='
          .concat(getDate());
  &lt;/script&gt;
  </code></pre>