import DateTime from "../../../../node_modules/.pnpm/luxon@3.5.0/node_modules/luxon/src/datetime.mjs";

//#region ../didcomm/src/util/transformers.ts
function DateParser(value) {
	const parsedDate = new Date(value);
	if (parsedDate instanceof Date && !Number.isNaN(parsedDate.getTime())) return parsedDate;
	const luxonDate = DateTime.fromSQL(value);
	if (luxonDate.isValid) return new Date(luxonDate.toString());
	return /* @__PURE__ */ new Date();
}

//#endregion
export { DateParser };
//# sourceMappingURL=transformers.mjs.map