@Test
public void testDayFormat() throws Exception {

    String result = DateUtils.ensureTwoDigits("2015-M1-D23", DateIntervalType.DAY);
    assertThat(result).isEqualTo("2015-01-23");
    result = DateUtils.ensureTwoDigits("2015-M11-D01", DateIntervalType.DAY);
    assertThat(result).isEqualTo("2015-11-01");
}