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的更多相关文章
随机推荐
- Entity Framework with MySQL 学习笔记一(查看EF和SQL请求日志)
做数据库的一向来都会很注意请求的次数还有语句.这关系到很多性能的问题. 因此在使用EF的时候如果不了解原理很可能会搞出很糟糕的请求. 所以呢,在还没有搞懂EF前最基本的是你得"看得见&quo ...
- Linux永久挂载远程网络目录
一般我们不永久挂载可以这样: mount -t cifs -o user=administrator,password=Fjqx2012,codepage=cp936,iocharset=cp936 ...
- word 生成目录
生成目录: (1)Ctrl+End,到达文档的最后一页: (2)"插入"菜单--引用--索引和目录(此时出现索引和目录对话框): (3)单击"目录"选项卡 a. ...
- Apache Hadoop最佳实践和反模式
摘要:本文介绍了在Apache Hadoop上运行应用程序的最佳实践,实际上,我们引入了网格模式(Grid Pattern)的概念,它和设计模式类似,它代表运行在网格(Grid)上的应用程序的可复用解 ...
- 我的SD卡乱码解决方案
转载请注明出处.chendesheng1988是原作者. 问题描述:射频模块读取证件信息后,串口读取的信息存到SD卡,存进去发现汉字是乱码. 解决方案:使用函数WideCharToMultiByte搞 ...
- 你需要知道的九大排序算法【Python实现】之基数排序
八.基数排序 基本思想:基数排序(radix sort)属于"分配式排序"(distribution sort),又称"桶子法"(bucket sort)或bi ...
- hdu 4848 搜索+剪枝 2014西安邀请赛
http://acm.hdu.edu.cn/showproblem.php?pid=4848 比赛的时候我甚至没看这道题,事实上不难.... 可是说实话,如今对题意还是理解不太好...... 犯的错误 ...
- [ES6] Module export
Default export: Default export is easy way to export a function to outside module. //flash-message.j ...
- c++11 : Variadic Macros(变长参宏)
Variadic macros are function-like macros that contain a variable number of arguments. Remarks To u ...
- 邮件协议(SMTP)性能测试总结(Foxmail邮箱)
先介绍一下邮件协议SMTP的工作机制(连接和发送过程),用wireshark工具抓包进行分析,如下: SMTP协议的工作机制(连接和发送过程): 1.建立TCP连接,并将邮件服务器地址给客户端: 2. ...