java获取年月日加减运算 Calendarcal=Calendar.getInstance();cal.setTime(newDate());intyear=cal.get(Calendar.YEAR);//获取年份intmonth=cal.get(Calendar.MONTH);//获取月份intday=cal.get(C