java获取年份的第一天和最后一天
Calendar cal = Calendar.getInstance();
cal.set(Calendar.MONTH, 0);
cal.set(Calendar.DATE, 1);
String dateStr = DateUtils.format(cal.getTime(), YYYY_MM_DD);
String timeStr = DateUtils.format(cal.getTime());
System.out.println(dateStr);
System.out.println(timeStr);
cal.set(Calendar.MONTH, 11);
cal.set(Calendar.DATE, 31);
dateStr = DateUtils.format(cal.getTime(), YYYY_MM_DD);
timeStr = DateUtils.format(cal.getTime());
System.out.println(dateStr);
System.out.println(timeStr);
不积跬步无以至千里,不积小流无以成江海