1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<!-- Documenting T:NAnt.Core.Tasks.TStampTask-->
5
<meta http-equiv="Content-Language" content="en-ca" />
6
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
<link rel="stylesheet" type="text/css" href="../style.css" />
8
<title><tstamp> Task</title>
11
<table width="100%" border="0" cellspacing="0" cellpadding="2" class="NavBar">
13
<td class="NavBar-Cell">
14
<a href="http://nant.sourceforge.net">
17
<img alt="->" src="../images/arrow.gif" />
18
<a href="../index.html">Help</a>
19
<img alt="->" src="../images/arrow.gif" />
20
<a href="../tasks/index.html">Task Reference</a>
21
<img alt="->" src="../images/arrow.gif" /> <tstamp></td>
22
<td class="NavBar-Cell" align="right">
26
<h1><tstamp></h1>
27
<p> Sets properties with the current date and time. </p>
28
<p> By default the <a href="../tasks/tstamp.html"><tstamp></a> task displays the current date and time and sets the following properties: </p>
29
<ul style="list-style-type: disc;">
30
<li>tstamp.date to yyyyMMdd</li>
31
<li>tstamp.time to HHmm</li>
32
<li>tstamp.now using the default DateTime.ToString() method</li>
34
<p> To set an additional property with a custom date/time use the <code>property</code> and <code>pattern</code> attributes. To set a number of additional properties with the exact same date and time use the <code>formatter</code> nested element (see example). </p>
35
<p> The date and time string displayed by the <a href="../tasks/tstamp.html"><tstamp></a> task uses the computer's default long date and time string format. You might consider setting these to the <a href="http://www.cl.cam.ac.uk/~mgk25/iso-time.html">ISO 8601 standard for date and time notation</a>. </p>
41
<th style="text-align: center;">Type</th>
43
<th style="text-align: center;">Required</th>
46
<td valign="top">pattern</td>
47
<td style="text-align: center;">string</td>
48
<td>The date/time pattern to be used.</td>
49
<td style="text-align: center;">False</td>
52
<td valign="top">property</td>
53
<td style="text-align: center;">string</td>
54
<td> The property to receive the date/time string in the given pattern. </td>
55
<td style="text-align: center;">False</td>
58
<td valign="top">failonerror</td>
59
<td style="text-align: center;">bool</td>
60
<td> Determines if task failure stops the build, or is just reported. The default is <b>true</b>. </td>
61
<td style="text-align: center;">False</td>
64
<td valign="top">if</td>
65
<td style="text-align: center;">bool</td>
66
<td> If <b>true</b> then the task will be executed; otherwise, skipped. The default is <b>true</b>. </td>
67
<td style="text-align: center;">False</td>
70
<td valign="top">unless</td>
71
<td style="text-align: center;">bool</td>
72
<td> Opposite of <code>if</code>. If <b>false</b> then the task will be executed; otherwise, skipped. The default is <b>false</b>. </td>
73
<td style="text-align: center;">False</td>
76
<td valign="top">verbose</td>
77
<td style="text-align: center;">bool</td>
78
<td> Determines whether the task should report detailed build log messages. The default is <b>false</b>. </td>
79
<td style="text-align: center;">False</td>
83
<h3>Nested Elements:</h3>
85
<!--NestedElementArray=T:NAnt.Core.Types.Formatter-->
91
<div class="nested-element">
99
<th style="text-align: center;">Type</th>
101
<th style="text-align: center;">Required</th>
104
<td valign="top" class="required">pattern</td>
105
<td style="text-align: center;">string</td>
106
<td> The string pattern to use to format the property. </td>
107
<td style="text-align: center;">True</td>
110
<td valign="top" class="required">property</td>
111
<td style="text-align: center;">string</td>
112
<td> The name of the NAnt property to set. </td>
113
<td style="text-align: center;">True</td>
116
<td valign="top">if</td>
117
<td style="text-align: center;">bool</td>
118
<td> Indicates if the formatter should be used to format the timestamp. If <b>true</b> then the formatter will be used; otherwise, skipped. The default is <b>true</b>. </td>
119
<td style="text-align: center;">False</td>
122
<td valign="top">unless</td>
123
<td style="text-align: center;">bool</td>
124
<td> Indicates if the formatter should be not used to format the timestamp. If <b>false</b> then the formatter will be used; otherwise, skipped. The default is <b>false</b>. </td>
125
<td style="text-align: center;">False</td>
136
<ul class="examples">
138
<p>Set the <code>build.date</code> property.</p>
140
<tstamp property="build.date" pattern="yyyyMMdd" verbose="true" />
144
<p>Set a number of properties for Ant like compatibility.</p>
146
<tstamp verbose="true">
147
<formatter property="TODAY" pattern="dd MMM yyyy"/>
148
<formatter property="DSTAMP" pattern="yyyyMMdd" unless="${date.not.needed}" />
149
<formatter property="TSTAMP" pattern="HHmm" if="${need.hours}" />
154
<h3>Requirements</h3>
155
<div style="margin-left: 20px;">
156
<b>Assembly:</b> NAnt.Core (0.90.3780.0)
b'\\ No newline at end of file'