[opencms-dev] ContentShow: DateTime
Borja Marcos Suarez
borja.suarez at fundacionctic.org
Thu Jul 28 08:06:08 CEST 2005
I think that the standard way to do it is using the standard i18n as follows:
<%@ taglib uri="http://jakarta.apache.org/taglibs/i18n-1.0" prefix="i18n" %>
<cms:contentcheck ifexists="YourDateElement">
<c:set var="yourDate"><cms:contentshow element="YourDateElement" /></c:set>
<%
Date date= null;
try
{
date = new Date(Long.parseLong((String)pageContext.getAttribute("yourDate")));
}
catch (Exception e)
{
out.println (e.getMessage());
}
%>
<i18n:formatDate value='<%= date %>' style="short" />
</cms:contentcheck>
Hope this helps you,
Best regards
Borja Marcos Suarez
-----Mensaje original-----
De: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] En nombre de Sebastian Lavena
Enviado el: miércoles, 27 de julio de 2005 22:58
Para: The OpenCms mailing list
Asunto: [opencms-dev] ContentShow: DateTime
Hi list!
I'm trying to show a date (not time), in my web...
I have in an XML a DateTimeOpenCms, but if I use "<cms:contentshow
element="DateTime" />", OpenCMS writes in my html a large number (the
longint that´s represent the dateTime).
So, hoy I can write in my html (from jsp) only the date that´s this number
represent?
Thanks you very much,
Sebastián
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list