moment time ago format reactjs code example Example: moment time ago format reactjs console.log(moment("2018-09-04T18:30:00.000Z").fromNow())