I am trying to create a little application which holds the data of licenses, I allow the user to input the date it was the redeemed and the license length.
I want to create a day's remaining field where the user can view how many days they have left until they have redeemed the new license.
I've used jxDatepicker
and have three combo boxes where the user selects the number of years, months and days the license is available for
int days = Integer.parseInt(cboDays.getSelectedItem().toString());
Date dRedeemed = cboDate.getDate();
SimpleDateFormat format = new SimpleDateFormat("dd/MM/YYYY");
String strRedeemed = format.format(dRedeemed);
days = (years * 365) + (months * 12) + days;
EDIT
I think i have left some people quite confused. That or i don't understand how this would fix my problem. Ill try and describe in a little more detail
Scenario
User can record their license using the application, they enter the day the license was redeemed and they also input the length of the license(days).
I am trying to figure out if you are able to calculate a new date from both these variables. for example
days = INPUT FROM USER;
dateRedeemed = new Date();
newDate = dateRedeemed + days;