pavelpie
8/2/2016 - 9:52 AM

Library of momentjs snippets

Library of momentjs snippets

//date after next 6 months
moment().add(6, "months").toDate();

//get next month date
moment().add(1, 'months').startOf("month").toDate();

// 30 days ago
moment().subtract(30, "days").toDate();

//formated date
moment().format('YYYY-MM-DD');