Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Overrides equals
if (this == obj) {
return true;
}
if (!(obj instanceof RFC977DateFormat)) {
return false;
}
RFC977DateFormat theOtherRFC977DateFormat = (RFC977DateFormat)obj;
synchronized (this) {
return ((internalShortDateFormat.equals(theOtherRFC977DateFormat.internalShortDateFormat)) &&
(internalLongDateFormat.equals(theOtherRFC977DateFormat.internalLongDateFormat)));
}
|
public java.lang.String | format(java.util.Date d)This method returns the long form of the RFC977 Date
return internalLongDateFormat.format(d);
|
public java.util.TimeZone | getTimeZone()Gets the time zone.
synchronized(this) {
return internalShortDateFormat.getTimeZone();
}
|
public int | hashCode()Overrides hashCode
return (int)(internalLongDateFormat.hashCode() & internalShortDateFormat.hashCode());
|
public boolean | isLenient()Tell whether date/time parsing is to be lenient.
synchronized(this) {
return internalShortDateFormat.isLenient();
}
|
public java.util.Date | parse(java.lang.String source)Parses text from the beginning of the given string to produce a date.
The method may not use the entire text of the given string.
This method is designed to be thread safe, so we wrap our delegated
parse method in an appropriate synchronized block.
source = source.trim();
if (source.indexOf(' ") == 6) {
return internalShortDateFormat.parse(source);
} else {
return internalLongDateFormat.parse(source);
}
|
public void | setLenient(boolean lenient)Specify whether or not date/time parsing is to be lenient. With
lenient parsing, the parser may use heuristics to interpret inputs that
do not precisely match this object's format. With strict parsing,
inputs must match this object's format.
synchronized(this) {
internalShortDateFormat.setLenient(lenient);
internalLongDateFormat.setLenient(lenient);
}
|
public void | setTimeZone(java.util.TimeZone zone)Sets the time zone of this SynchronizedDateFormat object.
synchronized(this) {
internalShortDateFormat.setTimeZone(zone);
internalLongDateFormat.setTimeZone(zone);
}
|