Answers for "convert moment date string to month"

1

moment string to date convert node js

var date = moment("2014-02-27T10:00:00").format('DD-MM-YYYY');
Posted by: Guest on December-06-2021
1

moment js get date 1 month

var currentDate = moment('2015-10-30');
var futureMonth = moment(currentDate).add(1, 'M');
var futureMonthEnd = moment(futureMonth).endOf('month');

if(currentDate.date() != futureMonth.date() && futureMonth.isSame(futureMonthEnd.format('YYYY-MM-DD'))) {
    futureMonth = futureMonth.add(1, 'd');
}

console.log(currentDate);
console.log(futureMonth);
Posted by: Guest on April-21-2020
0

datetime to date moment

//date time to date momentjs
var support_date = new Date("2021-10-23 00:00:00");
support_date = moment(support_date).format("YYYY-MM-DD");

//output:"2021-10-23"
Posted by: Guest on October-22-2021

Code answers related to "convert moment date string to month"

Browse Popular Code Answers by Language