const isWork = (start, end) => {
if (!start || !end) {
return false;
}
let diff = moment(start, "kk:mm").diff(moment(end, "kk:mm"), "hours");
if (diff >= 0) {
return (
moment().isBetween(moment(start, "kk:mm"), "00:00") ||
moment().isBetween("00:00", moment(end, "kk:mm"))
);
} else {
return moment().isBetween(moment(start, "kk:mm"), moment(end, "kk:mm"));
}
};