
how can i add 3 days to current date ?
i am using a script from jotform which has a calender field. the system shows the current date, but i want to add 3 days to the current date for the purpose that the client is only able to select dates 3 days after the current date. eg. if today is 1/1/2010, the only available dates he can select is 4/1/2010 on wards.
i am working on a school project & i really need help on this!!!
Please help me.

Hi Friend,
Try the following code:
import java.util.*;
class Add3Days{
public static void main(String[] args) {
Calendar cal = Calendar.getInstance();
System.out.println("Current date : " + ( cal.get(Calendar.DATE)) + "/" + (cal.get(Calendar.MONTH) + 1)+ "/"+cal.get(Calendar.YEAR));
cal.add(Calendar.DATE, 3);
System.out.println("Date after 3 days: " + (cal.get(Calendar.DATE))+ "/"+ (cal.get(Calendar.MONTH) + 1) + "/" + cal.get(Calendar.YEAR));
}
}
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.