Answers for "moment check valid date"

3

moment check valid date

var date = moment("2016-10-19");
var check = date.isValid();
console.log(check);
Posted by: Guest on March-03-2020
0

moment check greater than current time

function check() {
  var now = moment();
  var hourToCheck = (now.day() !== 0)?17:15;
  var dateToCheck = now.hour(hourToCheck).minute(30);
  
  return moment().isAfter(dateToCheck);
}

console.log(check())
Posted by: Guest on November-12-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language