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的更多相关文章
随机推荐
- BZOJ 4407 于神之怒加强版
http://www.lydsy.com/JudgeOnline/problem.php?id=4407 题意: 给下N,M,K.求 思路: 来自:http://blog.csdn.net/ws_y ...
- Delphi IDHTTP用法详解(六种用法)
一.IDHTTP的基本用法 IDHttp和WebBrowser一样,都可以实现抓取远端网页的功能,但是http方式更快.更节约资源,缺点是需要手动维护cook,连接等 IDHttp的创建,需要引入ID ...
- qt-solutions提供了8个开源项目
其实这是官方提供的源代码,至于为什么会另建项目,而没有整合到QT项目里去,我猜可能有2个原因: 1. 这几个项目本身不完善,并且也不是QT项目的核心,因此没有必要花精力去完善 2. 一定程度上可以维护 ...
- 【转】Win8/8.1/Win7小技巧:揪出C盘空间占用的真凶
原文网址:http://www.ithome.com/html/win8/55496.htm 不少使用Win8.Win8.1的用户不难发现,原先只占用20G大小的系统盘,随着使用时间的增加,C盘的磁盘 ...
- 32G sd卡格式化成fat
fat文件系统格式只支持4G及以下的内存空间的存储设备,对于4G及以上的存储设备可以使用fat32或ntfs文件系统,建议使用ntfs文件系统,这样可以最有效地利用存储设备的存储空间,而且可以减少出现 ...
- Android入门学习:Android 系统框架及应用程序执行过程
Android基础知识学习 新手上路,还请多多帮助.由于初学,博客内容难免有不正确的地方,还请各位多多指教,相互学习! 主要内容: 1.Android层次架构及主要功能 2.Android编程模型,程 ...
- 让背景图片跟随div大小变化代码
- 修改http中的refer(转)
Referrer的重要性 HTTP请求中有一个referer的报文头,用来指明当前流量的来源参考页.例如在www.sina.com.cn/sports/上点击一个链接到达cctv.com首页,那么就r ...
- js继承的三种实现
概念:在有些面向对象语言中,可以使用一个类(子类)继承另一个类(父类),子类可以拥有父类的属性和方法,这个功能可以在js中进行模拟. 三种方法: 第一种:扩展Object方法 Object.proto ...
- [Flask]学习Flask第三天笔记总结
from flask import Flask,render_template,request from others import checkLogin app = Flask(__name__) ...