how to minus 5 seconds in javascript datetime code example Example: javascript date minus seconds // datenow minus 20 seconds new Date(Date.now() - 20000);