import { truncate } from "./helpers.js";

//#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js
function inspectDate(dateObject, options) {
	const stringRepresentation = dateObject.toJSON();
	if (stringRepresentation === null) return "Invalid Date";
	const split = stringRepresentation.split("T");
	const date = split[0];
	return options.stylize(`${date}T${truncate(split[1], options.truncate - date.length - 1)}`, "date");
}

//#endregion
export { inspectDate as default };