|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--corejava.Day
Stores dates and perform date arithmetic. This is another date class, but more convenient that java.util.Date or java.util.Calendar
Field Summary | |
static int |
FRIDAY
|
static int |
MONDAY
|
static int |
SATURDAY
|
static int |
SUNDAY
|
static int |
THURSDAY
|
static int |
TUESDAY
|
static int |
WEDNESDAY
|
Constructor Summary | |
Day()
Constructs today's date |
|
Day(int yyyy,
int m,
int d)
Constructs a specific date |
Method Summary | |
void |
advance(int n)
Advances this day by n days. |
java.lang.Object |
clone()
Makes a bitwise copy of a Day object |
int |
daysBetween(Day b)
The number of days between this and day parameter |
boolean |
equals(java.lang.Object obj)
Compares this Day against another object |
int |
getDay()
Gets the day of the month |
int |
getMonth()
Gets the month |
int |
getYear()
Gets the year |
java.lang.String |
toString()
A string representation of the day |
int |
weekday()
Gets the weekday |
Methods inherited from class java.lang.Object |
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static int SUNDAY
public static int MONDAY
public static int TUESDAY
public static int WEDNESDAY
public static int THURSDAY
public static int FRIDAY
public static int SATURDAY
Constructor Detail |
public Day()
public Day(int yyyy, int m, int d)
yyyy
- year (full year, e.g., 1996,
not starting from 1900)m
- monthd
- dayMethod Detail |
public void advance(int n)
n
- the number of days by which to change this
day (can be < 0)public int getDay()
public int getMonth()
public int getYear()
public int weekday()
SUNDAY
, ...,
SATURDAY
)public int daysBetween(Day b)
b
- any datepublic java.lang.String toString()
public java.lang.Object clone()
public boolean equals(java.lang.Object obj)
obj
- another object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |