[opencms-dev] Display Date on JSP
Ivo Pescia
ivo.pescia at numcom.com
Sat Aug 27 16:14:56 CEST 2005
<%@ page session="false" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<c:set var="dateString"><cms:contentshow element="Release"/></c:set>
<%
java.util.Date date = new java.util.Date();
date.setTime(Long.parseLong(pageContext.getAttribute("dateString").toString(
)));
pageContext.setAttribute("date", date);
%>
<fmt:formatDate value="${date}" type="date" pattern="dd.MM.yyyy" />
that's how we solved it, don't know if there are more elegant ways.
we just needed it once so the above code is enough for us.
hth
Ivo
_____
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Kelley, Kevin
Sent: Mittwoch, 31. August 2005 16:07
To: opencms-dev at opencms.org
Subject: [opencms-dev] Display Date on JSP
Product: OpenCms 6
Are there any JSP taglibs built in to take the output of:
<cms:contentshow element="PublishDate"/>
And format it? Or do I need to just write a scriptlet.
Thanks,
Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050827/545d9de2/attachment.htm>
More information about the opencms-dev
mailing list