js add moment code example Example 1: moment to javascript date let now = moment() let now = now.toDate() Example 2: momentjs docs npm install moment