Problem for spaced dates

HI Omar:

Try the following code.

You can create a date object in one line by taking the guidance from Jerome using the Date.now() inside the Date constructor. So your addDays function would look like…

function addDays(days) {
    return new Date(Date.now() + days*24*60*60*1000); // today  
}