I'm trying to get the number of days between the current date and a specific date in JavaScript and I'm experiencing a weird behavior with Date(). The output that I get from this code is 32, but if today is Aug 28 and the specified date is Aug 30 I should/would like to get 2 as the output. Any suggestions? Thanks.
// hours*minutes*seconds*milliseconds
const oneDay = 24 * 60 * 60 * 1000;
const firstDate = new Date(2020, 8, 30);
const secondDate = new Date();
const diffDays = (firstDate - secondDate) / oneDay;
document.write(Math.round(diffDays));