Answers for "moment js set days"

2

moment add 30 days

moment().add(30, 'days');
Posted by: Guest on December-22-2020
3

moment subtract days

var startdate = moment();
startdate = startdate.subtract(1, "days");
startdate = startdate.format("DD-MM-YYYY");
Posted by: Guest on July-01-2020
8

format a date moment

moment(testDate).format('MM/DD/YYYY');
Posted by: Guest on December-18-2019
2

moment format heure

var time = "15:30:00";
var formatted = moment(time, "HH:mm:ss").format("LT");
console.log(formatted); 
//it will return 3:30 PM
Posted by: Guest on May-06-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language