"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const constants = require("./constants.cjs");
function constructFrom(date, value) {
  if (typeof date === "function") return date(value);
  if (date && typeof date === "object" && constants.constructFromSymbol in date)
    return date[constants.constructFromSymbol](value);
  if (date instanceof Date) return new date.constructor(value);
  return new Date(value);
}
exports.constructFrom = constructFrom;
exports.default = constructFrom;
//# sourceMappingURL=constructFrom.cjs.map
