I write a little function to check if the store is open or close. But the function don't work.
I try to change the hour but it the same result.
this.openTime.setHours(8);
this.openTime.setMinutes(0);
this.closeTime.setHours(20);
this.closeTime.setMinutes(30);
var open = moment(this.openTime).format('H:mm');
var close = moment(this.closeTime).format('H:mm');
var now = moment(Date.now()).format('H:mm');
console.log(close)
console.log(now)
if(now < close){
console.log('open') // i have close in console !
}else {
console.log('close')
}
Thanks !