uwcse.io
Class SimpleDate
java.lang.Object
|
+--uwcse.io.SimpleDate
- public class SimpleDate
- extends java.lang.Object
A basic Date class. Wraps up the complexity of the standard Java
date mechanism. A date represents a fixed point in time.
Constructor Summary |
SimpleDate()
Create a date whose time is now. |
SimpleDate(int year,
int month,
int day,
int hour,
int minute)
Create a date whose time is specified by these arguments. |
Method Summary |
long |
getTimeInMillis()
Answer the number of milliseconds this date is since Jan 1, 1970. |
java.lang.String |
toString()
Answer a nice representation of the date. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SimpleDate
public SimpleDate()
- Create a date whose time is now.
SimpleDate
public SimpleDate(int year,
int month,
int day,
int hour,
int minute)
- Create a date whose time is specified by these arguments.
getTimeInMillis
public long getTimeInMillis()
- Answer the number of milliseconds this date is since Jan 1, 1970.
toString
public java.lang.String toString()
- Answer a nice representation of the date.
- Overrides:
toString
in class java.lang.Object