You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

tstamp.html 2.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Ant User Manual</title>
  5. </head>
  6. <body>
  7. <h2><a name="tstamp">Tstamp</a></h2>
  8. <h3>Description</h3>
  9. <p>Sets the DSTAMP, TSTAMP and TODAY properties in the current project. The
  10. DSTAMP is in the &quot;yyyymmdd&quot; format, the TSTAMP is in the &quot;hhmm&quot;
  11. format and TODAY is &quot;month day year&quot;.</p>
  12. <p>These properties can be used in the buildfile, for instance, to create
  13. timestamped filenames or used to replace placeholder tags inside documents to
  14. indicate, for example, the release date. The best place for this task is in your
  15. initialization target.</p>
  16. <h3>Parameters</h3>
  17. <table border="1" cellpadding="2" cellspacing="0">
  18. <tr>
  19. <td valign="top"><b>Attribute</b></td>
  20. <td valign="top"><b>Description</b></td>
  21. <td align="center" valign="top"><b>Required</b></td>
  22. </tr>
  23. <tr> <td colspan="3"> No parameters</td>
  24. </tr>
  25. </table>
  26. <h3>Nested Elements</h3>
  27. The tstamp task supports a format nested element which allows a property to be
  28. given the current date and time in a given format. The date/time patterns are as defined in the Java
  29. SimpleDateFormat class.
  30. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  31. <tr>
  32. <td valign="top"><b>Attribute</b></td>
  33. <td valign="top"><b>Description</b></td>
  34. <td align="center" valign="top"><b>Required</b></td>
  35. </tr>
  36. <tr>
  37. <td valign="top">property</td>
  38. <td valign="top">
  39. The property which is to receive the date/time string in the given pattern
  40. </td>
  41. <td align="center" valign="top">Yes</td>
  42. </tr>
  43. <tr>
  44. <td valign="top">pattern</td>
  45. <td valign="top">The date/time pattern to be used. The values are defined by the Java
  46. SimpleDateFormat class</td>
  47. <td align="center" valign="top">Yes</td>
  48. </tr>
  49. </table>
  50. <h3>Examples</h3>
  51. <p> Set the standard DSTAMP, TSTAMP and TODAY properties according to the formats above</p>
  52. <pre> &lt;tstamp/&gt;</pre>
  53. <p> As for the above example, set the standard properties and also set the property
  54. &quot;TODAY_UK&quot; with the date/time pattern &quot;d MMM yyyy&quot;</p>
  55. <pre> &lt;tstamp&gt;
  56. &lt;format property=&quot;TODAY_UK&quot; pattern=&quot;d MMMM yyyy&quot;&gt;
  57. &lt;/tstamp&gt;
  58. </pre>
  59. <hr>
  60. <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  61. Reserved.</p>
  62. </body>
  63. </html>