ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Klein <jfkl...@wolfram.com>
Subject Re: Create a dir. named with the current system date
Date Mon, 16 Oct 2006 19:18:21 GMT
Marcelo de Moraes Serpa wrote:
> The question is:
> * How could I possibly retrieve the system current date and use it to 
> make a
> new directory?
The tstamp task with the format nested element does this.  Read its 
documentation for more help, but here's an example :

        <tstamp prefix="init">
            <format property="ymd" pattern="yyyy-MM-dd"/>
        </tstamp>

Now there's a property init.ymd which holds a string like "2006-10-16".  
Tstamp itself also creates other properties by default, but as shown you 
can make your own with the format nested element.

-- 
Joel Klein
Online at http://jfkbits.blogspot.com



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message