@Test public void shouldParseIntervalInMonth() throws Exception { assertEquals(5, new JodaFormatter().parsePeriod("5 months").getMonths()); assertEquals(5, new JodaFormatter().parsePeriod("5 days").getDays()); assertEquals(5, new JodaFormatter().parsePeriod("5 hours").getHours()); assertEquals(5, new JodaFormatter().parsePeriod("5 minutes").getMinutes()); assertEquals(5, new JodaFormatter().parsePeriod("5 seconds").getSeconds()); }
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);  }