javascript get date time now moment.min.js format code example Example: moment to date moment().toDate();