Tuesday, 10 September 2013

Calculating a future date

Calculating a future date

I have created a program to calculate days and in my program i want add 7
more days to the current date.
Which means if today's date is 9/11/2013, i want to make it 9/18/2013 by
getting the current date and adding 7 more days to it. How do i implement
this.
I know how to get today's date by using the date class but i don't know to
add another 7 days to the current date.
This is the method i used to get the current date :
public void dateCalculator(){
Date date;
date=new Date();
}
Thank you for your time.

No comments:

Post a Comment