DayMonthYearpublic class DayMonthYear extends MonthYear Represents a day, month, and year. |
Fields Summary |
---|
private int | day |
Constructors Summary |
---|
public DayMonthYear()
this(new Date());
| public DayMonthYear(Date date)
super(date);
this.day = DateUtil.getDayOfMonth(date);
| public DayMonthYear(int day, int month, int year)
super(month, year);
this.day = day;
|
Methods Summary |
---|
public int | compareTo(java.lang.Object obj)
DayMonthYear rhs = (DayMonthYear) obj;
int comparison = super.compareTo(obj);
if (comparison == 0) {
if (this.day < rhs.day) {
return -1;
} else if (this.day > rhs.day) {
return 1;
}
}
return comparison;
| public boolean | equals(java.lang.Object obj)
if (obj instanceof DayMonthYear) {
DayMonthYear rhs = (DayMonthYear) obj;
return super.equals(obj) && this.day == rhs.day;
}
return false;
| public int | getDay()
return this.day;
| public int | hashCode()
return super.hashCode() ^ this.day;
| public java.lang.String | toString()
return getMonth() + "/" + getDay() + "/" + getYear();
|
|