FileDocCategorySizeDatePackage
DayMonthYear.javaAPI DocExample1350Sun Sep 02 14:59:04 BST 2001com.oreilly.forum.domain

DayMonthYear

public 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 intcompareTo(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 booleanequals(java.lang.Object obj)

        if (obj instanceof DayMonthYear) {
            DayMonthYear rhs = (DayMonthYear) obj;
            return super.equals(obj) && this.day == rhs.day;
        }
        return false;
    
public intgetDay()

        return this.day;
    
public inthashCode()

        return super.hashCode() ^ this.day;
    
public java.lang.StringtoString()

        return getMonth() + "/" + getDay() + "/" + getYear();