@mantine/dates
Version:
Calendars, date and time pickers based on Mantine components
13 lines (12 loc) • 463 B
JavaScript
"use client";
import dayjs from "dayjs";
//#region packages/@mantine/dates/src/utils/to-date-string/to-date-string.ts
function toDateString(value) {
return value == null || value === "" ? value : dayjs(value).format("YYYY-MM-DD");
}
function toDateTimeString(value) {
return value == null || value === "" ? value : dayjs(value).format("YYYY-MM-DD HH:mm:ss");
}
//#endregion
export { toDateString, toDateTimeString };
//# sourceMappingURL=to-date-string.mjs.map