import moment from "moment";
export default function formatData(val, allValues, format) {
  let date = allValues[val] ? allValues[val] : [],
    formatType = format || "YYYY-MM-DD";
  if (date.length != 0) {
    return [
      moment(date[0]).format(formatType),
      moment(date[1]).format(formatType),
    ];
  }
}
