怎么用ant获取时间
1个回答
2017-05-09
展开全部
build.xml
[html] view plain copy 在CODE上查看代码片派生到我的代码片
<?xml version="1.0"?>
<project name="timestamp" default="timestampTarget">
<tstamp>
<format property="TODAY_UK" pattern="d-MMMM-yyyy" locale="en"/>
</tstamp>
<tstamp>
<format property="TODAY_CN" pattern="d-MMMM-yyyy" locale="zh"/>
</tstamp>
<tstamp>
<format property="touch.time" pattern="MM-dd-yyyy hh:mm aa" offset="-5" unit="hour"/>
</tstamp>
<target name="timestampTarget" >
<echo message="${DSTAMP}"/>
<echo message="${TODAY_UK}" />
<echo message="${TODAY_CN}" />
<echo message="${touch.time}" />
</target>
</project>
[html] view plain copy 在CODE上查看代码片派生到我的代码片
<?xml version="1.0"?>
<project name="timestamp" default="timestampTarget">
<tstamp>
<format property="TODAY_UK" pattern="d-MMMM-yyyy" locale="en"/>
</tstamp>
<tstamp>
<format property="TODAY_CN" pattern="d-MMMM-yyyy" locale="zh"/>
</tstamp>
<tstamp>
<format property="touch.time" pattern="MM-dd-yyyy hh:mm aa" offset="-5" unit="hour"/>
</tstamp>
<target name="timestampTarget" >
<echo message="${DSTAMP}"/>
<echo message="${TODAY_UK}" />
<echo message="${TODAY_CN}" />
<echo message="${touch.time}" />
</target>
</project>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询