JAVA_build_ant_Tstamp
Description
Sets the DSTAMP, TSTAMP, and TODAY properties in the current project. By default, the DSTAMP property is in the format "yyyyMMdd", TSTAMP is in the format "hhmm", and TODAY is in the format "MMMM dd yyyy". Use the nested <format> element to specify a different format.
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
| Attribute | Description | Required |
| prefix | Prefix used for all properties set. The default is no prefix. | No |
Nested Elements
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.
| Attribute | Description | Required |
| property | The property to receive the date/time string in the given pattern. | Yes |
| pattern | The date/time pattern to be used. The values are as defined by the Java SimpleDateFormat class. | Yes |
| timezone | The timezone to use for displaying time. The values are as defined by the Java TimeZone class. | No |
| offset | The numeric offset to the current time | No |
| unit | The unit of the offset to be applied to the current time. Valid Values are
|
No |
| locale | The locale used to create date/time string. The general form is "language, country, variant" but either variant or variant and country may be omitted. For more information please refer to documentation for the Locale class. | No |
Examples
<tstamp/>
sets the standard DSTAMP, TSTAMP, and TODAY properties according to the default formats.
<tstamp>
<format property="TODAY_GB" pattern="d-MMMM-yyyy" locale="en,GB"/>
</tstamp>
sets the standard properties as well as the property TODAY_UK with the date/time pattern "d-MMMM-yyyy" using English locale (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. The standard properties are set also.
<tstamp prefix="start"/>
Sets three properties with the standard formats, prefixed with "start.": start.DSTAMP, start.TSTAMP, and start.TODAY.
JAVA_build_ant_Tstamp的更多相关文章
随机推荐
- head,tail,cat,more,less
tail FILE -n 4,查看文件最后4行内容head FILE -n 10,查看文件最前4行内容 使用cat more less都可以查看文本内容,但是它们三者有什么区别呢?more和less的 ...
- delphi7开发webservice部属在apache服务器中 转
delphi7开发webservice部属在apache服务器中 delphi7 webservice apache 用Delphi7开发Web Service程序,并把服务程序放在apache We ...
- City Tour
Description Alice想要从城市A出发到城市B,由于Alice最近比较穷(不像集训队陈兴老师是个rich second),所以只能选择做火车从A到B.不过Alice很讨厌坐火车,火车上人比 ...
- HDOJ 1061 Rightmost Digit(循环问题)
Problem Description Given a positive integer N, you should output the most right digit of N^N. Input ...
- Cplus
1,factorials[i] = i * factorials[i - 1]; #include <iostream>using namespace std; const int ArS ...
- Apache-common项目提供的工具
---- MD5加密与生成UUID例子(依赖于commons-io.jar):begin ------------------------------------------------------- ...
- Django中生成PDF(一)
Django中生成PDF(一) 需求描述: 某网站与其用户达成一致的协议,每份协议中都有用户相关的独特信息,且还需要生成PDF并存档.PDF文件中需要有企业LOGO.文字描述等信息.其展现形式 ...
- 计算N!的质因数2的个数
容易得出N!质因数2的个数 = [N / 2] + [N / 4] + [N / 8] + .... 下面通过一个简单的例子来推导一下过程:N = 10101(二进制表示)现在我们跟踪最高位的1,不考 ...
- js中的数据类型及其转换
Js中的数据类型 Js中的数据类型一共有六种,即number,string,boolean,underfine,null,object. 一,number Number数据类型指的是数字,可以为整型, ...
- 对C++默认构造函数的理解
在文章开始之前,首先指出对于c++新手的两个常见的误解: 一.任何class如果没有定义default constructor,就会被合成出一个来. 二.编译器合成出来的default constru ...