"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const common_1 = require("@nestjs/common");
const logger = new common_1.Logger('datetimeTransformer');
const datetimeTransformer = ({ value }) => {
    logger.debug("date time transformer debug", value);
    if (value === '' || value === undefined || value === null)
        return null;
    const parsed = new Date(value);
    return isNaN(parsed.getTime()) ? null : parsed;
};
exports.default = datetimeTransformer;
//# sourceMappingURL=datetime-transformer.js.map