You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by nathan phillips <na...@hotmail.com> on 2003/03/17 19:59:57 UTC

Jelly formatDate

Does the formatDate tag work correctly?  Since Jelly does not build 
according to the web sites instructions right now, I'm using 
commons-jelly-20030310.073407.jar and commons-jelly-tags-fmt-SNAPSHOT.jar.  
All of these example below produce the same result of 2003-03-17 00:00:00.0.

<fmt:formatDate value="${date}" pattern="MM/dd/yyyy" />
<fmt:formatDate value="${date}" dateStyle="short" />
<fmt:formatDate value="${date}" type="date" dateStyle="short" />
<fmt:formatDate value="${date}" dateStyle="full" />

Does anyone have any suggestions?  Thanks for your help.

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus


RE: Jelly formatDate

Posted by Willie Vu <wi...@yahoo.com>.
Nathan,

<fmt:formatDate> mimics JSTL's counterpart.  In order to do formatting
correctly, you must have a locale set prior to using formatting tags.  <fmt>
tags locate locale in the following order:

1. use locale specified in parent <fmt:bundle>, if any
2. use locale specified in <fmt:setLocale>, prior to processing the tag
3. set a fallback locale by setting a locale object in the Jelly context
variable "org.apache.commons.jelly.tags.fmt.fallbackLocale"


--
Willie Vu



> -----Original Message-----
> From: nathan phillips [mailto:nathanpp@hotmail.com] 
> Sent: Tuesday, March 18, 2003 3:00
> To: commons-user@jakarta.apache.org
> Subject: Jelly formatDate
> 
> 
> Does the formatDate tag work correctly?  Since Jelly does not build 
> according to the web sites instructions right now, I'm using 
> commons-jelly-20030310.073407.jar and 
> commons-jelly-tags-fmt-SNAPSHOT.jar.  
> All of these example below produce the same result of 
> 2003-03-17 00:00:00.0.
> 
> <fmt:formatDate value="${date}" pattern="MM/dd/yyyy" /> 
> <fmt:formatDate value="${date}" dateStyle="short" /> 
> <fmt:formatDate value="${date}" type="date" dateStyle="short" 
/> <fmt:formatDate value="${date}" dateStyle="full" />
> 
> Does anyone have any suggestions?  Thanks for your help.
> 
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE*  
> http://join.msn.com/?page=features/virus
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
>