public final class MailDate extends java.lang.Object implements java.lang.Comparable<MailDate>
Modifier and Type | Field and Description |
---|---|
int |
day
day of the month
|
int |
dow
day of week
|
int |
hour
hour in day
|
int |
min
minute in hour
|
int |
month
month
|
java.lang.String |
sDeplasareGMT
offset to GMT
|
int |
sec
second in minute
|
java.lang.String |
sLocalZone
local time zone
|
int |
year
year
|
Constructor and Description |
---|
MailDate(java.util.Date dParam)
Construct an object based on a Date
|
MailDate(MailDate mdParam)
Copy constructor.
|
MailDate(java.lang.String data)
Constructor based on a String representation of a date.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(MailDate mdParam)
Method to compare two dates.
|
boolean |
equals(java.lang.Object mdParam)
Check if two dates are equal.
|
java.util.Date |
getDate()
Get the contents of this object in a
Date format. |
int |
hashCode()
Hash code for this object
|
static void |
main(java.lang.String[] args)
Testing code
|
java.lang.String |
toFullString()
A default
Date.toString() for the current date |
java.lang.String |
toMailString()
The representation from the standard mail : "Fri, 6 Oct 2006 11:11:08 +0200"
|
java.lang.String |
toString()
Show a nifty date, such as:
"12 Jul 2003" "23 September" "Wednesday 24" "Yesterday 11:24" |
java.lang.String |
toString2()
The same as
toString() , but always having the hour:time at the end |
public int day
public int month
public int year
public int dow
public int hour
public int min
public int sec
public java.lang.String sDeplasareGMT
public java.lang.String sLocalZone
public MailDate(java.util.Date dParam)
dParam
- Date object to build uponpublic MailDate(java.lang.String data)
data
- the string representation of the datepublic MailDate(MailDate mdParam)
mdParam
- public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString2()
toString()
, but always having the hour:time at the endpublic java.lang.String toFullString()
Date.toString()
for the current datepublic java.lang.String toMailString()
public int compareTo(MailDate mdParam)
compareTo
in interface java.lang.Comparable<MailDate>
mdParam
- another MailDate to compare topublic boolean equals(java.lang.Object mdParam)
equals
in class java.lang.Object
mdParam
- other objectpublic int hashCode()
hashCode
in class java.lang.Object
public java.util.Date getDate()
Date
format.public static void main(java.lang.String[] args)
args
- command line arguments