org.apache.tools.ant.taskdefs

Class Tstamp

public class Tstamp extends Task

Sets properties to the current time, or offsets from the current time. The default properties are TSTAMP, DSTAMP and TODAY;

Since: Ant 1.1

UNKNOWN: category="utility"

Nested Class Summary
classTstamp.CustomFormat
This nested element that allows a property to be set to the current date and time in a given format.
static classTstamp.Unit
set of valid units to use for time offsets.
Method Summary
Tstamp.CustomFormatcreateFormat()
create a custom format with the current prefix.
voidexecute()
create the timestamps.
voidsetPrefix(String prefix)
Set a prefix for the properties.

Method Detail

createFormat

public Tstamp.CustomFormat createFormat()
create a custom format with the current prefix.

Returns: a ready to fill-in format

execute

public void execute()
create the timestamps. Custom ones are done before the standard ones, to get their retaliation in early.

Throws: BuildException on error.

setPrefix

public void setPrefix(String prefix)
Set a prefix for the properties. If the prefix does not end with a "." one is automatically added.

Parameters: prefix the prefix to use.

Since: Ant 1.5