You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Litton, Tom - CEPM" <To...@cepm-us.com> on 2005/05/12 20:28:34 UTC

getting the current date in jelly

I've been searching for a way to set a variable to the current date in a jelly script.  Its got to be really simple, but apparently i'm the only one in the world that has to do it, because I can't find any examples anywhere. 
 
I'm need this for a maven script (not a jsp page).  
 
Thanks,
 
Tom


----------------------------------------------------------------------
The information contained in this transmission is intended only for
the personal and confidential use of the designated recipients named
herein.  If the reader of this transmission is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
transmission in error, and that any review, dissemination,
distribution, or copying of this transmission is strictly prohibited.
If you have received this communication in error, please notify the
sender and return and delete the original transmission immediately.
Thank you.


Re: getting the current date in jelly

Posted by Eric Giguere <er...@videotron.ca>.
Hi
Would this do the trick?
    <j:new var="theDate" className="java.util.Date"/>

You need of course to define the 'j' namespace in the list of the 
maven's project element  (xmlns:j="jelly:core").

Hope it helps.
Eric.

Litton, Tom - CEPM wrote:

>I've been searching for a way to set a variable to the current date in a jelly script.  Its got to be really simple, but apparently i'm the only one in the world that has to do it, because I can't find any examples anywhere. 
> 
>I'm need this for a maven script (not a jsp page).  
> 
>Thanks,
> 
>Tom
>
>
>----------------------------------------------------------------------
>The information contained in this transmission is intended only for
>the personal and confidential use of the designated recipients named
>herein.  If the reader of this transmission is not the intended
>recipient or an agent responsible for delivering it to the intended
>recipient, you are hereby notified that you have received this
>transmission in error, and that any review, dissemination,
>distribution, or copying of this transmission is strictly prohibited.
>If you have received this communication in error, please notify the
>sender and return and delete the original transmission immediately.
>Thank you.
>
>
>  
>



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