how to enter current date and time in javascript code example Example: calculate today date javascript var today = new Date();