maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@multitask.com.au
Subject Re: RE : Getting current date/time?
Date Thu, 17 Jul 2003 01:19:11 GMT
There's also a jelly format date tag too.

See 
http://jakarta.apache.org/commons/jelly/libs/fmt/tags.html#fmt:formatDate
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/
Work:      http://www.multitask.com.au


Andy Paul <ap003a1164@blueyonder.co.uk> wrote on 17/07/2003 05:13:21 AM:

> James,
>     Just in case you're interested or want to do more formatting with 
> the date, I believe this is a Jellified
> version where you can set up the format...
>   <!-- create a Java Date instance for 'today' -->
>   <new var="now" className="java.util.Date"/>
> 
>     <!-- create a Java Date formatter -->
>   <new var="formatter" className="java.text.SimpleDateFormat">
>             <arg value="EEE dd/MM/yy"/>
>    <new>
> 
>   <!-- create a new jelly variable (xx) from the output of putting 
> the 
date through the formatter -->
>   <invoke var="xx" on="${formatter}" method="format">
>         <j:arg value="${now}"/>
>    </j:invoke>
> <!-- display the variable -->
>   The time according to jelly is ${xx}
> 
>     Regards
>           Andy
> 
> >>You can use <tstamp/> (which is an ant tag). It set 2 properties 
DSTAMP
> >>and TSTAMP with date and time (see ant documentation for more details)
> >>
> >>Ex:
> >>
> >> <tstamp/>
> >> <property name="log.filename" value="log-${DSTAMP}.${TSTAMP}.log"/>
> >> 
> >>
> >
> >Great! That's exactly what I was after and I just couldn't find it.
> >
> > 
> >
> >>-----Message d'origine-----
> >>De : James CE Johnson [mailto:jcej@tragus.org]
> >>Envoyé : mercredi 16 juillet 2003 16:27
> >>À : users@maven.apache.org
> >>Objet : Getting current date/time?
> >>
> >>
> >>Hey all,
> >>
> >>Is there any way for my maven.xml to fetch the current date/time so 
that
> >>I can subsequently write (using <echo...) it to a file?
> >>
> >>Thanks,
> >>James
> >>
> >> 
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > 
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message