@Test public void shouldParseIntervalInYear() throws Exception { assertYear(1, new JodaFormatter().parsePeriod("1 year")); assertYear(1, new JodaFormatter().parsePeriod("1 years")); assertYear(2, new JodaFormatter().parsePeriod("2 years")); }
public Period parsePeriod(String intervalString) { return parse(intervalString, Locale.getDefault()); }
JodaFormatter { public Period parsePeriod(String intervalString) { return parse(intervalString, Locale.getDefault()); } }
JodaFormatter { public Period parsePeriod(String intervalString) { return parse(intervalString, Locale.getDefault()); } JodaFormatter(); }
JodaFormatter { public Period parsePeriod(String intervalString) { return parse(intervalString, Locale.getDefault()); } JodaFormatter(); Period parse(String intervalString, Locale locale); Period parsePeriod(String intervalString); String formatPeriod(Period period); DateTime parseDateTime(String isoDateTime); String formatDateTime(DateTime dateTime); }
JodaFormatter { public Period parsePeriod(String intervalString) { return parse(intervalString, Locale.getDefault()); } JodaFormatter(); Period parse(String intervalString, Locale locale); Period parsePeriod(String intervalString); String formatPeriod(Period period); DateTime parseDateTime(String isoDateTime); String formatDateTime(DateTime dateTime);  }