|
TstampDescriptionSets the These properties can be used in the build-file, for instance, to create time-stamped filenames, or used to replace placeholder tags inside documents to indicate, for example, the release date. The best place for this task is probably in an initialization target. Parameters
Nested ElementsThe Tstamp task supports a<format> 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.
Examples<tstamp/>
sets the standard <tstamp> <format property="TODAY_UK" pattern="d-MMMM-yyyy" locale="en"/> </tstamp>
sets the standard properties as well as the property
<tstamp> <format property="touch.time" pattern="MM/dd/yyyy hh:mm aa" offset="-5" unit="hour"/> </tstamp> Creates a timestamp, in the property touch.time, 5 hours before the current time. The format in this example is suitable for use with the <touch> task. The standard properties are set also. <tstamp prefix="start"/>
Sets three properties with the standard formats, prefixed with "start.":
Copyright © 2000-2002 Apache Software Foundation. All rights Reserved. |