I am new to programing. i know how to return a date
public Date yesterday()
{
if(this.day == 1)
{
if(this.Check("Mar", this.month))
{
if (this.checkLeapYear(this.year))
{
this.day = 29;
this.weekDay = this.week[this.flipBack(this.week, this.weekDay)];
this.month = this.monthOfYear[this.flipBack(this.monthOfYear, this.month)];
}
else
{
this.day = 28;
this.weekDay = this.week[this.flipBack(this.week, this.weekDay)];
this.month = this.monthOfYear[this.flipBack(this.monthOfYear, this.month)];
}
}
if (this.month30Days(this.month))
{
this.day = 31;
this.weekDay = this.week[this.flipBack(this.week, this.weekDay)];
this.month = this.monthOfYear[this.flipBack(this.monthOfYear, this.month)];
}
if (!this.month30Days(this.month) || !this.Check("Feb", this.month))
{
this.day = 30;
this.weekDay = this.week[this.flipBack(this.week, this.weekDay)];
this.month = this.monthOfYear[this.flipBack(this.monthOfYear, this.month)];
}
}
this.day = --this.day;
this.weekDay = this.week[this.flipBack(this.week, this.weekDay)];
}