class DateRangeAndType {

  public static DateRangeAndType fromString(final String dateRange) {
    Preconditions.checkNotNull(dateRange, "DateRange cannot be null.");
    Preconditions.checkArgument(!dateRange.isEmpty(), "DateRange cannot be empty.");

    return dateRange.contains(",") ? parseCustomFormat(dateRange) : parseEnumFormat(dateRange);
  }

  private  DateRangeAndType(
      LocalDate startDate, LocalDate endDate, ReportDefinitionDateRangeType type);

}