You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matthew O'Haire <MO...@Trysoft.com> on 2001/04/12 03:55:21 UTC

Date formatting (simple question)

Hi folks,

Can I format java.util.Date presentations with <bean:write>, or do I need to
do something at the property getter?

TKS.  Matt.

Re: Date formatting (simple question)

Posted by David Winterfeldt <dw...@yahoo.com>.
The Jakarta Tablibs project has a really nice DateTime
Taglib.

http://jakarta.apache.org/taglibs/index.html

It does a lot more than just this, but here is an
example.
<dt:format pattern="M/dd/yyyy  h:mm a">
   <dt:currenttime/>
</dt:format>

David

--- Oleg V Alexeev <go...@penza.net> wrote:
> Hello Matthew,
> 
> Thursday, April 12, 2001, 5:55:21 AM, you wrote:
> 
> MOH> Can I format java.util.Date presentations with
> <bean:write>, or do I need to
> MOH> do something at the property getter?
> 
> You can do it in getter method and by special
> version of bean:write
> tag - with parameters to define formatting type and
> locale. I can send
> you one, if you interested.
> 
> -- 
> Best regards,
>  Oleg                           
> mailto:gonza@penza.net
> 
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

Re: Date formatting (simple question)

Posted by Oleg V Alexeev <go...@penza.net>.
Hello Matthew,

Thursday, April 12, 2001, 5:55:21 AM, you wrote:

MOH> Can I format java.util.Date presentations with <bean:write>, or do I need to
MOH> do something at the property getter?

You can do it in getter method and by special version of bean:write
tag - with parameters to define formatting type and locale. I can send
you one, if you interested.

-- 
Best regards,
 Oleg                            mailto:gonza@penza.net