|
|||||||||
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
public class 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. since 1.5.x. 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
- the name of the property.public void setPattern(java.lang.String pattern)
pattern
- the pattern to use.SimpleDateFormat
public void setLocale(java.lang.String locale)
locale
- the locale to use.Locale
public void setTimezone(java.lang.String id)
id
- the timezone value.TimeZone
public void setOffset(int offset)
offset
- the offset to use.public void setUnit(java.lang.String unit)
unit
- the unit to use.public void setUnit(Tstamp.Unit unit)
unit
- the unit to use.public void execute(Project project, java.util.Date date, Location location)
project
- project to set property in.date
- date to use as a starting point.location
- line in file (for errors)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |