locale specific date format
Hi How do I set locale specific date formats? I tried setting org.apache.struts.taglib.bean.format.date with format strings within locale specific applicationResources.properties but the format keeps coming out the same Fri Nov 21 16:46:05 CST 2003 any ideas? cheers Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: locale specific date format
Nathan Coast wrote: How do I set locale specific date formats? I tried setting org.apache.struts.taglib.bean.format.date with format strings within locale specific applicationResources.properties but the format keeps coming out the same Fri Nov 21 16:46:05 CST 2003 any ideas? For displaying on a JSP page? You can use JSTL... fmt:setLocale value='en-US'/ fmt:formatDate value='${dateVariable}'/ or set the pattern based on a locale and then... fmt:formatDate value='${dateVariable}' pattern='${datePattern}'/ Probably the JSTL Master Kris Schneeder could chime in here with a better way. I could be way off. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: locale specific date format
Schneeder? Hm, sounds familiar, but... Anyway, forgetting JSTL for a second (gasp!), you're saying you've got something like: ApplicationResources_en.properties: dateFormat=... ApplicationResources_fr.properties: dateFormat=... Yes? If so, then maybe this is what you're looking for: bean:write name=dateObj formatKey=dateFormat/ This will use the current Struts locale, or you can add the locale attribute to specify the name of a session attribute for the locale you'd prefer. Quoting Rick Reumann [EMAIL PROTECTED]: Nathan Coast wrote: How do I set locale specific date formats? I tried setting org.apache.struts.taglib.bean.format.date with format strings within locale specific applicationResources.properties but the format keeps coming out the same Fri Nov 21 16:46:05 CST 2003 any ideas? For displaying on a JSP page? You can use JSTL... fmt:setLocale value='en-US'/ fmt:formatDate value='${dateVariable}'/ or set the pattern based on a locale and then... fmt:formatDate value='${dateVariable}' pattern='${datePattern}'/ Probably the JSTL Master Kris Schneeder could chime in here with a better way. I could be way off. -- Rick -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: locale specific date format
Kris Schneider wrote: Schneeder? Hm, sounds familiar, he he sorry about that Kris:) Just don't beat me... you were sort of a bad ass as the superintendent on One Day At A Time.:) -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: locale specific date format
Yipes, that's dated... Quoting Rick Reumann [EMAIL PROTECTED]: Kris Schneider wrote: Schneeder? Hm, sounds familiar, he he sorry about that Kris:) Just don't beat me... you were sort of a bad ass as the superintendent on One Day At A Time.:) -- Rick -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]