You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by co...@apache.org on 2001/07/11 17:36:57 UTC

cvs commit: jakarta-ant/docs/manual/CoreTasks tstamp.html

conor       01/07/11 08:36:54

  Modified:    docs/manual/CoreTasks tstamp.html
  Log:
  Describe timestamp's ability to offset dates
  
  Revision  Changes    Path
  1.5       +34 -2     jakarta-ant/docs/manual/CoreTasks/tstamp.html
  
  Index: tstamp.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/tstamp.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- tstamp.html	2001/05/22 01:25:23	1.4
  +++ tstamp.html	2001/07/11 15:36:49	1.5
  @@ -37,8 +37,8 @@
   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 
   <a href=http://java.sun.com/products/jdk/1.2/docs/api/java/text/SimpleDateFormat.html>SimpleDateFormat</a> class. 
  -
  -
  +The format element also allows offsets to be applied to the time to generate different time values.
  +<br><br>
   <table width="60%" border="1" cellpadding="2" cellspacing="0">
     <tr>
       <td valign="top"><b>Attribute</b></td>
  @@ -57,6 +57,28 @@
       <td valign="top">The date/time pattern to be used. The values are as defined by the Java SimpleDateFormat class.</td>
       <td align="center" valign="top">Yes</td>
     </tr>
  +  <tr>
  +    <td valign="top">offset</td>
  +    <td valign="top">The numeric offset to the current time</td>
  +    <td align="center" valign="top">No</td>
  +  </tr>
  +  <tr>
  +    <td valign="top">unit</td>
  +    <td valign="top">The unit of the offset to be applied to the current time.
  +                     Valid Values are
  +                     <ul>
  +                        <li>millisecond</li>
  +                        <li>second</li>
  +                        <li>minute</li>
  +                        <li>hour</li>
  +                        <li>day</li>
  +                        <li>week</li>
  +                        <li>month</li>
  +                        <li>year</li>
  +                     </ul>
  +    </td>
  +    <td align="center" valign="top">No</td>
  +  </tr>
   </table>
   
   <h3>Examples</h3>
  @@ -77,6 +99,16 @@
   sets the standard properties as well as the property
   <code>TODAY_UK</code> with the date/time pattern &quot;d-MMMM-yyyy&quot;
   (eg., 21-May-2001).
  +
  +<pre>
  +  &lt;tstamp&gt;
  +      &lt;format property=&quot;touch.time&quot; pattern=&quot;MM/dd/yyyy hh:mm aa&quot; 
  +              offset=&quot;-5&quot; unit=&quot;hour&quot;/&gt;
  +  &lt;/tstamp&gt; 
  +</pre>    
  +<p>
  +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 &lt;touch&gt; task</p>
   
   <hr>
   <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights Reserved.</p>