get date string today javascript es6 code example Example: calculate today date javascript var today = new Date();