new date object parse in moment in right way code example Example 1: moment to date moment().toDate(); Example 2: momentjs docs npm install moment