import { moveToWithinRange } from '../moveToWithinRange/moveToWithinRange';

export const returnDateView = (selectedDate: Date | null, min: Date | null, max: Date | null) => {
  return selectedDate || ((min || max) && moveToWithinRange(new Date(), min, max)) || new Date();
};
