You can use the fmt library. It adjusts to your locale.
<jsp:useBean id="currDate" class="java.util.Date"/>
<fmt:formatDate value="${currDate}" type="date" dateStyle="full"/>
Zarar
On Tue, 21 Jun 2005, Arno Schatz wrote:
> Hi,
>
> How do I present a Date in the users locale in a JSP?
>
> I tried
> <bean:write name="mybean" property="somedate" />
> but the format is not ok. When I use the format attribute it won't show up in
> the locale
> preferred way.
> I would like to format it like:
>
> DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,
> DateFormat.MEDIUM, getLocale());
>
> But how to do that in a JSP?
>
> thanks,
> Arno
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]