"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const dayjs = require("dayjs");
function isDateValid({ date, maxDate, minDate }) {
  if (date == null) {
    return false;
  }
  if (Number.isNaN(date.getTime())) {
    return false;
  }
  if (maxDate && dayjs(date).isAfter(maxDate, "date")) {
    return false;
  }
  if (minDate && dayjs(date).isBefore(minDate, "date")) {
    return false;
  }
  return true;
}
exports.isDateValid = isDateValid;
