DateRange getRange(String dateRangeString) throws ParseException {
        if (dateRangeString == null || dateRangeString.isEmpty())
            return null;

        String[] dateArr = dateRangeString.split("-");
        if (dateArr.length > 2 || dateArr.length < 1)
            return null;
        // throw new IllegalArgumentException("Only Strings containing two Date separated by a '-' or a single Date are allowed");

        ParsedCalendar from = parseDateString(dateArr[0]);
        ParsedCalendar to;
        if (dateArr.length == 2)
            to = parseDateString(dateArr[1]);
        else
            // faster and safe?
            // to = new ParsedCalendar(from.parseType, (Calendar) from.parsedCalendar.clone());
            to = parseDateString(dateArr[0]);

        try {
            return new DateRange(from, to);
        } catch (IllegalArgumentException ex) {
            return null;
        }
    }
@Test
    public void testParseReverseDateRangeWithoutYearAndDay_645() throws ParseException {
        DateRange dateRange = dateRangeParser.getRange("Aug 10-Jan");
        assertFalse(dateRange.isInRange(getCalendar(2016, Calendar.AUGUST, 9)));
        assertTrue(dateRange.isInRange(getCalendar(2016, Calendar.AUGUST, 10)));
        assertTrue(dateRange.isInRange(getCalendar(2016, Calendar.JANUARY, 1)));
        assertTrue(dateRange.isInRange(getCalendar(2016, Calendar.JANUARY, 20)));
        assertTrue(dateRange.isInRange(getCalendar(2016, Calendar.JANUARY, 31)));
        assertFalse(dateRange.isInRange(getCalendar(2016, Calendar.FEBRUARY, 1)));
    }