[opencms-dev] ContentShow: DateTime
Sebastian Lavena
slavena at mkti.com.ar
Thu Jul 28 19:00:15 CEST 2005
I couldn´t find the taglib "i18n-1.0", but with your code you give me ideas,
and I parse in "my way" the date, to write it in my html in spanish format,
and 2 digit for day and month (i.e.: 30/05/05 and not 30/5/05).
So, thanks, my problem is now solved. But I think that´s probably the
library "i18n-1.0", can be helpful to me in the future... any idea that´s
where I can find it..?
Best regards,
Sebastian
----- Original Message -----
From: "Borja Marcos Suarez" <borja.suarez at fundacionctic.org>
To: "The OpenCms mailing list" <opencms-dev at opencms.org>
Sent: Thursday, July 28, 2005 3:06 AM
Subject: RE: [opencms-dev] ContentShow: DateTime
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
_______________________________________________
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
__________ NOD32 1.1179 (20050727) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
More information about the opencms-dev
mailing list