moment js year only
moment().year(Number);
moment().year(); // Number
moment().years(Number);
moment().years(); // Number
moment js year only
moment().year(Number);
moment().year(); // Number
moment().years(Number);
moment().years(); // Number
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);
how to create date object with specific time in moment js
var date = "2017-03-13";
var time = "18:00";
var timeAndDate = moment(date + ' ' + time);
console.log(timeAndDate);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us