Reputation: 86135
I am wondering if I can get a new Calendar object based on current time plus a given timespan, say 5 minutes.
Upvotes: 4
Views: 15391
Reputation: 49
You got to use c.set() methods to set year, month and date for the calendar object.
Upvotes: 0
Reputation: 24791
Calendar c = Calendar.getInstance(); //gives u calendar with current time
c.add(Calendar.MINUTE, 5); //add 5 minutes to calendar
Upvotes: 13
Reputation: 7754
Use add function of Calendar class for adding and setTime(new Date())
for getting calendar based on current time.
Upvotes: 0