how to get a date of today in js code example Example: calculate today date javascript var today = new Date();