public class Tstamp.CustomFormat
extends java.lang.Object
| Constructor and Description |
|---|
CustomFormat() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(Project project,
java.util.Date date,
Location location)
validate parameter and execute the format.
|
void |
execute(Project project,
java.util.Date date,
Location location,
boolean reproducibleBuildRequested)
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.
|
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.SimpleDateFormatpublic void setLocale(java.lang.String locale)
locale - the locale to use.Localepublic void setTimezone(java.lang.String id)
id - the timezone value.TimeZonepublic void setOffset(int offset)
offset - the offset to use.@Deprecated 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)public void execute(Project project, java.util.Date date, Location location, boolean reproducibleBuildRequested)
project - project to set property in.date - date to use as a starting point.location - line in file (for errors)reproducibleBuildRequested - whether reproducible
builds are requestes - in which case defaults for timezone
and locale may be applied