moment to js new date code example Example 1: moment to date moment().toDate(); Example 2: moment js from now moment(date).fromNow();