From 70d8b69e67780f4c078eeb657496c3d21c277c67 Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Wed, 11 Jul 2001 15:36:49 +0000 Subject: [PATCH] Describe timestamp's ability to offset dates git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269320 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTasks/tstamp.html | 36 +++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/manual/CoreTasks/tstamp.html b/docs/manual/CoreTasks/tstamp.html index bea52dd67..115d2c5f0 100644 --- a/docs/manual/CoreTasks/tstamp.html +++ b/docs/manual/CoreTasks/tstamp.html @@ -37,8 +37,8 @@ The 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. +

@@ -57,6 +57,28 @@ The date/time patterns are as defined in the Java + + + + + + + + + +
AttributeThe date/time pattern to be used. The values are as defined by the Java SimpleDateFormat class. Yes
offsetThe numeric offset to the current timeNo
unitThe unit of the offset to be applied to the current time. + Valid Values are +
    +
  • millisecond
  • +
  • second
  • +
  • minute
  • +
  • hour
  • +
  • day
  • +
  • week
  • +
  • month
  • +
  • year
  • +
+
No

Examples

@@ -78,6 +100,16 @@ sets the standard properties as well as the property TODAY_UK with the date/time pattern "d-MMMM-yyyy" (eg., 21-May-2001). +
+  <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

+

Copyright © 2000,2001 Apache Software Foundation. All rights Reserved.