moment check days of difference between days
var a = moment([2007, 0, 29]);
var b = moment([2007, 0, 28]);
a.diff(b, 'days')
moment check days of difference between days
var a = moment([2007, 0, 29]);
var b = moment([2007, 0, 28]);
a.diff(b, 'days')
moment date difference in days
moment(new Date()).diff(moment(new Date()), 'days') // 0
moment js between two dates
// moment version => 2.13.0.
const start = moment().subtract(1, 'days');
const end = new Date();
const actual = moment().subtract(1, 'hours');
const test = moment(actual).isBetween(start, end);
console.log(test);
// moment version < 2.13.0.
var startDate = new Date(2013, 1, 12)
, endDate = new Date(2013, 1, 15)
, date = new Date(2013, 2, 15)
, range = moment().range(startDate, endDate);
range.contains(date);
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