FileDocCategorySizeDatePackage
SimplifiedDateFormat.javaAPI DocApache James 2.3.13461Fri Jan 12 12:56:34 GMT 2007org.apache.mailet.dates

SimplifiedDateFormat

public interface SimplifiedDateFormat

This interface is designed to provide a simplified subset of the methods provided by the java.text.DateFormat class.

This interface is necessary because of the difficulty in writing thread safe classes that inherit from java.text.DateFormat. This difficulty leads us to approach the problem using composition rather than inheritance. In general classes that implement this interface will delegate these calls to an internal DateFormat object.

Fields Summary
Constructors Summary
Methods Summary
public java.lang.Stringformat(java.util.Date d)
Formats a Date into a date/time string.

param
date the time value to be formatted into a time string.
return
the formatted time string.

public java.util.TimeZonegetTimeZone()
Gets the time zone.

return
the time zone associated with this SimplifiedDateFormat.

public booleanisLenient()
Tell whether date/time parsing is to be lenient.

return
whether this SimplifiedDateFormat is lenient.

public java.util.Dateparse(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.

param
source A String whose beginning should be parsed.
return
A Date parsed from the string.
throws
ParseException if the beginning of the specified string cannot be parsed.

public voidsetLenient(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.

param
lenient when true, parsing is lenient
see
java.util.Calendar#setLenient

public voidsetTimeZone(java.util.TimeZone zone)
Sets the time zone of this SimplifiedDateFormat object.

param
zone the given new time zone.