Date Classes in Standard Library

Methods of the Date class

boolean after(Date other)
Tests if this date is after the specified date
boolean before(Date other) Tests if this date is before the specified date
int compareTo(Date other)
Tells  which date came before the other
long getTime()
Returns milliseconds since the epoch
(1970-01-01 00:00:00 GMT)
void setTime(long n)
Sets the date to the given number of milliseconds since the epoch

Methods of the Date class

Points in Time

.

The GregorianCalendar Class

Date Handling in the Java Library

.

Designing a Day Class

.

Designing a Day Class

Implementing a Day Class

Second Implementation

Third Implementation