import { constructFromSymbol } from "./constants.js";
function constructFrom(date, value) {
  if (typeof date === "function") return date(value);
  if (date && typeof date === "object" && constructFromSymbol in date)
    return date[constructFromSymbol](value);
  if (date instanceof Date) return new date.constructor(value);
  return new Date(value);
}
export {
  constructFrom,
  constructFrom as default
};
//# sourceMappingURL=constructFrom.js.map
