java - Incrementing SimpleDate by days using For Loop -


i'm having issues using loop increment simpledate current date date in future using days.

i first days in double eventday variable, returned public double geteventdays(). i'm trying grab variable, , use in public data access-er called public simpledate geteventdate()

first off have no idea how grab variable data access-er, or if it's possible. after need initialize loop like;

for (int 1 = 0, < (int)eventday, i+=1) {      eventday.nextday(); // need use .nextday() add day n amount of times      return eventday; } return null; 

i know wrong, it's i'm looking for, have no idea how start off.

does want?

public simpledateformat geteventdate() {     final simpledateformat sdf = new simpledateformat();     sdf.getcalendar().add(calendar.day_of_month, (int)geteventdays());     return sdf; } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -