@Test
public void strToCalendar() throws Exception {

    String dateStr = "2018-03-31 22:22:22";
    Calendar calendar = DateUtil.strToCalendar(dateStr);
    System.out.println("calendar, before add, getTime：" + calendar.getTime());
    calendar.add(Calendar.MONTH, -1);
    System.out.println("calendar, after add, getTime：" + calendar.getTime());
    System.out.println("calendar, day：" + calendar.get(Calendar.DAY_OF_YEAR));
}