import { isValid as i, formatDate as f, parseISO as m } from "date-fns";
import { DEFAULT_DATE_DISPLAY_FORMAT as o } from "../constants/index.js";
function p(n) {
  if (!n.length) return "";
  const e = (t) => {
    if (t instanceof Date)
      return i(t) ? f(t, o) : String(t);
    if (typeof t != "string") return String(t);
    try {
      const r = m(t);
      return i(r) ? f(r, o) : t;
    } catch {
      return t;
    }
  };
  return n.length === 2 ? `${e(n[0])} - ${e(n[1])}` : e(n[0]);
}
export {
  p as default
};
//# sourceMappingURL=formatDateValue.js.map
