how to get the date from current date in javascript code example Example: get today's date javascript var today = new Date();