addMinutesToDate
Calculates the date of n minutes from the given date, returning its string representation.
- Use
new Date()to create a date object from the first argument. - Use
Date.prototype.getTime()andDate.prototype.setTime()to addnminutes to the given date. - Use
Date.prototype.toISOString(),String.prototype.split()andString.prototype.replace()to return a string inyyyy-mm-dd HH:MM:SSformat.