@Test public void testGetYearMonth() { Date date = DateUtil.parseDateTime("2012-01-01 11:57:48", null); assertEquals("12_01", DateUtil.getYearMonth(date)); date = DateUtil.parseDateTime("2012-12-01 00:00:00", null); ApiLogger.debug(date + ", " + date.getTime()); }
public static String getYearMonth(Date date){ return yearMonthSdf.get().format(date); }
DateUtil { public static String getYearMonth(Date date){ return yearMonthSdf.get().format(date); } }
DateUtil { public static String getYearMonth(Date date){ return yearMonthSdf.get().format(date); }  }
DateUtil { public static String getYearMonth(Date date){ return yearMonthSdf.get().format(date); }  static String getYearMonth(Date date); static String formateYearMonthDay(Date date); static Date parseYearMonthDay(String timeStr, Date defaultValue); static String formateDateTime(Date date); static Date parseDateTime(String timeStr, Date defaultValue); static final int getCurrentHour(); static final int getLastHour(); static final int getNextHour(); static Date getFirstDayOfCurMonth(); static Date getFirstDayInMonth(Date date); static Date getFirstDayInMonth(int month); static boolean isCurrentMonth(Date date); }
DateUtil { public static String getYearMonth(Date date){ return yearMonthSdf.get().format(date); }  static String getYearMonth(Date date); static String formateYearMonthDay(Date date); static Date parseYearMonthDay(String timeStr, Date defaultValue); static String formateDateTime(Date date); static Date parseDateTime(String timeStr, Date defaultValue); static final int getCurrentHour(); static final int getLastHour(); static final int getNextHour(); static Date getFirstDayOfCurMonth(); static Date getFirstDayInMonth(Date date); static Date getFirstDayInMonth(int month); static boolean isCurrentMonth(Date date);  }