> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 16, 2002 1:46 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Shortest date format
> 
> 
> "By hand" means that I use the pattern. Actually, I meant creating the
> pattern by hand in JSTL.
> Which would be kind of stupid, since I can't know what 
> language will be
> used...
> So if I could load the pattern from the locale, how would this work?

Assuming you've got your resource bundle in place, something like this:

  <c:set var="pattern">
    <fmt:message key="datePattern"/>
  </c:set>
  <fmt:formatDate pattern="${pattern}"
                  value="${yourDateValue}"/>

Then, in your en_US resource file, you'd have:

datePattern=MM/dd

while in your en_GB resource file, you'd have:

datePattern=dd/MM

--
Martin Cooper


> 
> Regards,
> Eric
> 
> 
> > I'm not sure what you mean by "by hand". You can load the 
> pattern from a
> > (localisable) resource and then pass it to <fmt:formatDate>. Is that
> coding
> > by hand (and thus bad :), or will that work for you?
> 
> --
> Martin Cooper
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to