hi all,
can any one tell me what's wrong?
i'm triyng to get next date from object that I created and still getting the same date
public Date nextDay() { int newDay=this.day, newMonth=this.month, newYear=this.year; if ((this.month == 1) || (this.month == 3) || (this.month == 5) || (this.month == 7) || (this.month == 8) || (this.month == 10)){ if (this.day < 31) newDay = +this.day; if (this.day == 31) newDay = 01; newMonth = +this.month; } if ((this.month == 4) || (this.month == 6) || (this.month == 9) || (this.month == 11)){ if (this.day < 30) newDay = +this.day; if (this.day == 30) newDay = 01; newMonth = +this.month; } if (this.month == 2){ if (this.day < 28) newDay = +this.day; if (this.day == 28) newDay = 01; newMonth = +this.month; if (((this.year%4 == 0) && (this.year%100!=0) || (this.year%400==0)) && (this.day==28)) newDay = +this.day; } if (this.month == 12){ if (this.day < 31) newDay = +this.day; if (this.day == 31) newYear = +this.year; newMonth = 01; newDay = 01; } return new Date(newDay, newMonth, newYear); }