|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.taskdefs.Tstamp.CustomFormat
This nested element that allows a property to be set to the current date and time in a given format. The date/time patterns are as defined in the Java SimpleDateFormat class. The format element also allows offsets to be applied to the time to generate different time values.
Constructor Summary | |
Tstamp.CustomFormat()
Create a format |
Method Summary | |
void |
execute(Project project,
java.util.Date date,
Location location)
validate parameter and execute the format |
void |
setLocale(java.lang.String locale)
The locale used to create date/time string. |
void |
setOffset(int offset)
The numeric offset to the current time. |
void |
setPattern(java.lang.String pattern)
The date/time pattern to be used. |
void |
setProperty(java.lang.String propertyName)
The property to receive the date/time string in the given pattern |
void |
setTimezone(java.lang.String id)
The timezone to use for displaying time. |
void |
setUnit(java.lang.String unit)
Deprecated. setUnit(String) is deprecated and is replaced with setUnit(Tstamp.Unit) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the unit in its own class. |
void |
setUnit(Tstamp.Unit unit)
The unit of the offset to be applied to the current time. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Tstamp.CustomFormat()
Method Detail |
public void setProperty(java.lang.String propertyName)
propertyName
- public void setPattern(java.lang.String pattern)
pattern
- SimpleDateFormat
public void setLocale(java.lang.String locale)
locale
- Locale
public void setTimezone(java.lang.String id)
id
- TimeZone
public void setOffset(int offset)
offset
- public void setUnit(java.lang.String unit)
public void setUnit(Tstamp.Unit unit)
unit
- public void execute(Project project, java.util.Date date, Location location)
project
- project to set property indate
- date to use as a starting pointlocation
- line in file (for errors)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |