ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <rambiusparkisan...@yahoo.com>
Subject Re: Retrieving current date & time values in defferent variables
Date Wed, 10 Aug 2005 16:02:04 GMT
Hello,

Jan lead you to the correct direction and here is some
real code:

<project>
    <tstamp prefix="today">
        <format property="year" pattern="yyyy"/>
        <format property="month" pattern="MM"/>
        <format property="date" pattern="dd"/>
    </tstamp>
    <echoproperties prefix="today"/>
</project>

HTH
Ivan

--- Karunakar Chatla <karunakarc@cybage.com> wrote:

> I think it gets the timestamp to only one property.
> I wanted each time part in separate property.
> Like...
> year in a property called today.year
> day in a property called today.day
> month in a property called today.month
> hour in a property called today.hour
> minutes in a property called today.min and
> seconds in a property called today.sec
> 
> I hope I cleared my point here.
> Plese let me know if I am not getting your point.
> 
> 
> ----- Original Message ----- 
> From: <Jan.Materne@rzf.fin-nrw.de>
> To: <user@ant.apache.org>
> Sent: Wednesday, August 10, 2005 9:08 PM
> Subject: AW: Retrieving current date & time values
> in defferent variables
> 
> 
> http://ant.apache.org/manual/CoreTasks/tstamp.html
> <format>
> 
> See the example.
> 
> 
> Jan
> 
> >-----Urspr√ľngliche Nachricht-----
> >Von: Karunakar Chatla
> [mailto:karunakarc@cybage.com]
> >Gesendet: Mittwoch, 10. August 2005 17:32
> >An: Ant Users List
> >Betreff: Retrieving current date & time values in
> defferent variables
> >
> >
> >Hi,
> >
> >I wanted to retrieve date ant time values values of
> current
> >time in defferent variables - Like...
> > Day in a variable called today.day
> > Year in a variable called today.year and so on for
> month,
> >hour, min and second.
> >Can anybody help me out with this?
> >I can get current time from TStamp but how can I
> get the
> >values to different variables. I have to form
> another string
> >using these variables.
> >
> >Thanks,
> >Karunakar Chatla
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message