[opencms-dev] How to change the date format?

Jack Bakker jbakker at iable.ca
Thu Jan 25 14:54:14 CET 2007


Instead of the fmt:formatDate, you might try the DateTime tag library:

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

Something like:
<dt:format pattern="yyyy-MM-dd">put date here</dt:format>

But I have not looked at the news template code to see if the above is
applicable or not.

..............................
Jack Bakker 
-----< www.iable.ca >---------
 

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Samir Djulancic
> Sent: January 25, 2007 4:02 AM
> To: opencms-dev at opencms.org
> Subject: [opencms-dev] How to change the date format?
> 
> Hi everyone, 
> 
> I postet this question on the OpenCms forum but no one 
> answered it. I hope that someone here could help me..
> 
> I wanted to change the format of the date for the News and 
> Events. I'm using the templateOne. I could imagine that it is 
> not that difficult. But I just can't find the right way..
> 
> I found this at: 
> \system\modules\org.opencms.frontend.templateone.modules\eleme
> nts\list_news_right.jsp :
> 
> <%
> 	cms.setDate("dateString");
> %>
> <fmt:formatDate value="${date}" type="date" dateStyle="short" 
> /> - <cms:contentshow element="Teaser" />
> 
> 
> 
> 
> I could imagine if I could find a way to change or to add the 
> "dateStyle" it could work. But where to do this??
> 
> The format now is like: 01/24/07
> I need it like: 2007-01-24
> 
> I hope someone can help me.
> 
> Thanks a lot..
> Cheers
> --
> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list To 
> change your list options, or to unsubscribe from the list, 
> please visit http://lists.opencms.org/mailman/listinfo/opencms-dev
> 
> 





More information about the opencms-dev mailing list