You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brian McGovern <bm...@imediainc.com> on 2005/02/24 21:19:13 UTC

How to handle Dates?

Hi looking for input on how to approach dates across all levels of my struts app.  Mainly what approach will allow me to handle formatting on the presentation layer. 

Is there any tag lib available in struts to handle formatting of a date type object ?  

-B

Re: How to handle Dates?

Posted by Catalin Croitoru <ca...@gmail.com>.
I solved this problem with a format key in my application.properties:

application.date_format.short=dd.MM.yyyy
application.date_format.long=dd.MM.yyyy hh:mm:ss

and in presentation layer I use : bean:write. this tag has:  formatKey
or format as atributes.
in my case I use formatKey. if you would like to change the formating
just modify the format in your application.properties.

I hope will help this.


On Fri, 25 Feb 2005 10:45:26 -0000, Bob Arnott <bo...@aungate.com> wrote:
> Brian McGovern wrote:
> > Hi looking for input on how to approach dates across all
> > levels of my struts app.  Mainly what approach will allow
> > me to handle formatting on the presentation layer.
> >
> > Is there any tag lib available in struts to handle
> > formatting of a date type object ?
> 
> I wrote my own tag to format dates before I came across the Jakarta
> Taglibs. You could try the Date/Time taglib if you don't want to use
> JSTL.
> 
> http://jakarta.apache.org/taglibs/doc/datetime-doc/intro.html
> 
> Cheers,
> 
> --
> Bob Arnott
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


RE: How to handle Dates?

Posted by Bob Arnott <bo...@aungate.com>.
Brian McGovern wrote:
> Hi looking for input on how to approach dates across all
> levels of my struts app.  Mainly what approach will allow
> me to handle formatting on the presentation layer.  
> 
> Is there any tag lib available in struts to handle
> formatting of a date type object ? 

I wrote my own tag to format dates before I came across the Jakarta 
Taglibs. You could try the Date/Time taglib if you don't want to use 
JSTL.

http://jakarta.apache.org/taglibs/doc/datetime-doc/intro.html

Cheers,

-- 
Bob Arnott



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