moment now js code example Example 1: moment js from now moment(date).fromNow(); Example 2: moment now format var date = moment().format('MM/DD/YYYY');