1let A = moment('2020-01-02');
2let B = moment('2020-01-01');
3let C = moment('2020-01-03');
4console.log(A.diff(B, 'days'));// => 1
5console.log(A.diff(C, 'days'));// => -1
1function check() {
2 var now = moment();
3 var hourToCheck = (now.day() !== 0)?17:15;
4 var dateToCheck = now.hour(hourToCheck).minute(30);
5
6 return moment().isAfter(dateToCheck);
7}
8
9console.log(check())