const require_rolldown_runtime = require('../../../../../../../../_virtual/rolldown_runtime.js');
const require_ValidateBy$1 = require('../common/ValidateBy.js');

//#region ../../node_modules/.pnpm/class-validator@0.14.1/node_modules/class-validator/cjs/decorator/typechecker/IsDate.js
var require_IsDate = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/class-validator@0.14.1/node_modules/class-validator/cjs/decorator/typechecker/IsDate.js": ((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.IsDate = exports.isDate = exports.IS_DATE = void 0;
	const ValidateBy_1 = require_ValidateBy$1.require_ValidateBy();
	exports.IS_DATE = "isDate";
	/**
	* Checks if a given value is a date.
	*/
	function isDate(value) {
		return value instanceof Date && !isNaN(value.getTime());
	}
	exports.isDate = isDate;
	/**
	* Checks if a value is a date.
	*/
	function IsDate(validationOptions) {
		return (0, ValidateBy_1.ValidateBy)({
			name: exports.IS_DATE,
			validator: {
				validate: (value, args) => isDate(value),
				defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a Date instance", validationOptions)
			}
		}, validationOptions);
	}
	exports.IsDate = IsDate;
}) });

//#endregion
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function () {
    return require_IsDate();
  }
});