On Fri, Mar 07, 2003 at 09:40:22AM +0100, Wirell Johan wrote:
> Anders,
> 
> we use the text tag for this purpose.
> 
> jsp:
> 
> <ww:text name="'date_format'" value0="modified"/>
> 
> property resource bundle:
> 
> date_format={0,date,yyyy-MM-dd}
> 
> 

Ah, thanks. This was pretty much the solution I was looking for :)

//Anders



> -----Original Message-----
> From: Anders Engström [mailto:[EMAIL PROTECTED]
> Sent: den 6 mars 2003 21:49
> To: [EMAIL PROTECTED]
> Subject: [OS-webwork] Format a Date
> 
> 
> Hi.
> 
> Something tells me this is somewhere in the docs, but I can't find it =P
> 
> I have an Action that have a method 'getModified() : java.util.Date'. I
> access this property in a JSP using <ww:property value="modified"/>. 
> 
> How can I specify the formatting of the Date? I can modify it somewhat
> by doing "ActionContext.setLocale(..)" in the Action, but I'd like
> better control (handling minutes and seconds).
> 
> Does WW have built-in support for this - or do I have to format the Date
> in the Action and let getModified() return a formatted String?
> 
> Best Regards //Anders
> 
> 
> -- 
> |===================================|
> |    Anders Engström                |
> |    [EMAIL PROTECTED]            |
> |    http://www.gnejs.net           |
> |===================================|
> |Your mind is like an umbrella.     |
> |It doesn't work unless you open it.|
> |  /Frank Zappa                     |
> |===================================|
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
> for complex code. Debugging C/C++ programs can leave you feeling lost and 
> disoriented. TotalView can help you find your way. Available on major UNIX 
> and Linux platforms. Try it free. www.etnus.com
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

-- 
|===================================|
|    Anders Engström                |
|    [EMAIL PROTECTED]            |
|    http://www.gnejs.net           |
|===================================|
|Your mind is like an umbrella.     |
|It doesn't work unless you open it.|
|  /Frank Zappa                     |
|===================================|



Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to