Problem : How to get current date in Ant script?
Solution : example code snippet below :
Solution : example code snippet below :
<!--target for current date -->
<target name="curdate">
<tstamp>
<format property="curDate" pattern="yyyy MMMM dd HH:mm:ss" locale="en"/>
</tstamp>
<!--echoing cuurent date -->
<echo message="Current time and date: ${curDate}" />
<!--setting current date in a property -->
<property name="starttime" value="${start}"/>
</target>
0 nhận xét:
Đăng nhận xét