nodejs moment format code example Example 1: javascript moment m = moment('2013-03-01', 'YYYY-MM-DD') Example 2: momentjs docs npm install moment