I need help adding 282 days to this code
public void onClick_add282(View v) {
TextView tv_output;
tv_output = (TextView) findViewById(R.id.tv_output);
dPicker = (DatePicker)findViewById(R.id.dp_cal);
Integer dYear = dPicker.getYear();
Integer dMonth = dPicker.getMonth()+1;
Integer dDate = dPicker.getDayOfMonth();
StringBuilder ad=new StringBuilder();
ad.append(dDate.toString()).append("-").append(dMonth.toString()).append("-").append(dYear.toString()).append("");
String dStr=ad.toString();
tv_output.setText(dStr);
}
I tried to just add 282 to this line like this
Integer dDate = dPicker.getDayOfMonth()+282;
and it returned 300-6-2014(today being the 18-6-2014 where I live)
EDIT: I'm not trying to add to the current date but to a date selected by the user