DEV Community

Cover image for All about moment.js
Dezina
Dezina

Posted on

All about moment.js

var startTime = new Date();

startTime: moment(startTime).format("HH:mm"), // to get 24 hours time format
endTime: moment(endTime).format("h:mm"), // to get 12 hours time format

Top comments (0)