朋友们,我从用户那里得到了两个输入
1.InitDate from DatePicker
2.Difference in between two dates (numberOfDates)
我需要计算 FinalDate 这样
FinalDate=InitDate+numberOfDates
到目前为止我所做的
private void CalcLastDate(int days)
{
long millis=days*24*60*60;
Calendar c = Calendar.getInstance();
c.set(settingsFromDate.getYear(), settingsFromDate.getMonth(), settingsFromDate.getDayOfMonth());
long initDate = c.getTimeInMillis();
long longFinalDate=initDate+millis;
}