int calculateMonth()
{
int month;
month = this.getOpenDate().getMonth() - this.getCloseDate().getMonth();
int year = this.getCloseDate().getYear()-this.getOpenDate().getYear();
month = month + year*12;
this.setTime(month);
return month;
}
--------------------------------------------------------------------------------------------------------------------------
public Date getCloseDate()
{
SimpleDateFormat ft = new SimpleDateFormat("dd/MM/yyyy");
Date dt = null;
try
{
dt =ft.parse( this.closeDate);
}
catch (ParseException e)
{
e.printStackTrace();
}
return dt;
}
{
int month;
month = this.getOpenDate().getMonth() - this.getCloseDate().getMonth();
int year = this.getCloseDate().getYear()-this.getOpenDate().getYear();
month = month + year*12;
this.setTime(month);
return month;
}
--------------------------------------------------------------------------------------------------------------------------
public Date getCloseDate()
{
SimpleDateFormat ft = new SimpleDateFormat("dd/MM/yyyy");
Date dt = null;
try
{
dt =ft.parse( this.closeDate);
}
catch (ParseException e)
{
e.printStackTrace();
}
return dt;
}
-------------------------------------------------------------------------------------------------------------------------
public void setCloseDate(String closeDate)
{
this.closeDate = closeDate;
}