You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by leo leonid <te...@leonid.de> on 2002/09/09 23:41:11 UTC
esql:get-timestamp | how to add a locale to the format attribute?
hi,
I've got this
<esql:get-timestamp column="date" format="EEEE, d. MMMM yyyy, h:mm a"/>
and now I want to add a locale just like in
SimpleDateFormat("EEEE, d. MMMM yyyy, h:mm a", Locale.US)
If it is possible to do this in XML, does anyone know the right syntax?
Thanks.
/Leo
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: esql:get-timestamp | how to add a locale to the format attribute?
Posted by leo leonid <te...@leonid.de>.
On Monday, September 9, 2002, at 11:41 Uhr, leo leonid wrote:
> hi,
> I've got this
> <esql:get-timestamp column="date" format="EEEE, d. MMMM yyyy, h:mm
> a"/>
> and now I want to add a locale just like in
> SimpleDateFormat("EEEE, d. MMMM yyyy, h:mm a", Locale.US)
>
> If it is possible to do this in XML, does anyone know the right syntax?
> Thanks.
> /Leo
to answer my own question I looked at esql.xsl(lines 777-787) and now I
know
that it is *not* possible.
I now use the i18n transformer to do the job:
<i18n:date-time src-pattern="yyyy-MM-dd hh:mm:ss" pattern="FULL" >
<esql:get-timestamp column="date" format="yyyy-MM-dd hh:mm:ss"/>
</i18n:date-time>
ok, this works, but this is probably not the fastest way if you have a
page with a lot of dates and you have to override the server locale.
Wouldn't it be better to have a possibility to define a global
format+locale in esql?
/Leo
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>