moment js add day
var new_date = moment(startdate, "DD-MM-YYYY").add(5, 'days');
moment js add day
var new_date = moment(startdate, "DD-MM-YYYY").add(5, 'days');
get first day of month javascript moment
const startOfMonth = moment().clone().startOf('month').format('YYYY-MM-DD hh:mm');
const endOfMonth = moment().clone().endOf('month').format('YYYY-MM-DD hh:mm');
moment get start of week in datetime
const today = moment();
const from_date = today.startOf('week');
const to_date = today.endOf('week');
console.log({
from_date: from_date.toString(),
today: moment().toString(),
to_date: to_date.toString(),
});
// {
// from_date: "Sun Apr 22 2018 00:00:00 GMT-0500",
// today: "Thu Apr 26 2018 15:18:43 GMT-0500",
// to_date: "Sat Apr 28 2018 23:59:59 GMT-0500"
// }
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