cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joose Vettenranta <jo...@iki.fi>
Subject Re: JXTemplate formatDate problem
Date Fri, 19 Aug 2005 13:57:33 GMT
Hi,

I have in my softwares date in session which I use formatDate and it  
works, so your problem perhaps is to get that Date instance..

how about using ${java.util.Date.getInstance()} ?

HTH, Joose

Frank Taffelt kirjoitti 19.8.2005 kello 15:51:

> this was also one of the other ways i tried, but it didn't work.  
> Can somebody confirm that this construct should work? If yes it's  
> bug !
>
> Joose Vettenranta wrote:
>
>> Hi,
>>
>> try <jx:formatDate value="${java.util.Calendar.getInstance().getTime
>> ()}" pattern="dd.MM.yyyy" />
>>
>> HTH, Joose
>>
>> Frank Taffelt kirjoitti 19.8.2005 kello 14:24:
>>
>>
>>> Marc Salvetti wrote:
>>>
>>>
>>>> Hello,
>>>>
>>>>
>>>>>  <c:set var="now" value="${java.util.Calendar.getInstance()}"/>
>>>>>
>>>>>
>>>> try <c:set var="now"
>>>> value="${java.util.Calendar.getInstance().getTime()}"/>
>>>>
>>>>
>>>
>>> the new version also doesn't work:
>>>
>>> <?xml version="1.0"?>
>>> <page
>>> xmlns:c="http://apache.org/cocoon/templates/jx/1.0">
>>> <test>
>>>  <c:set var="now" value="${java.util.Calendar.getInstance().getTime
>>> ()}"/>
>>>
>>>  <variant>
>>>   <c:formatDate value="${now}"/>
>>>  </variant>
>>>   <c:set var="sdf" value="${java.text.SimpleDateFormat
>>> ('dd.MM.yyyy')}"/>
>>>  <variant>
>>>   ${sdf.format(now)}
>>>  </variant>
>>>  </test>
>>> </page>
>>>
>>>
>>> any other ideas ?
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message