You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Régis Millet <mi...@gmail.com> on 2008/05/15 17:28:36 UTC
date formatting issue
Hello!
I have a cocoon field, formated like that :
fd:datatype base="date">
<fd:convertor type="formatting" lenient="true">
<fd:patterns>
<fd:pattern>dd/MM/yyyy</fd:pattern>
</fd:patterns>
</fd:convertor>
</fd:datatype>
My problem is that, when i input a non-valid date, it is accepted.
for example, if I input "32/12/2001", it is accepted as "01/01/2002". does
anyone know a way to correct this?
Thanks a lot.
RE: date formatting issue
Posted by "Linden H van der (MI)" <H....@MI.unimaas.nl>.
Hi,
that's because your lenient setting is set to true, which recalculates the date exactly the way you describe. Set lenient to false and you should get an error.
Bye, Helma
-----Original Message-----
From: Régis Millet [mailto:milletregis@gmail.com]
Sent: Thursday, May 15, 2008 17:29
To: users@cocoon.apache.org
Subject: date formatting issue
Hello!
I have a cocoon field, formated like that :
fd:datatype
base="date">
<fd:convertor type="formatting" lenient="true">
<fd:patterns>
<fd:pattern>dd/MM/yyyy</fd:pattern>
</fd:patterns>
</fd:convertor>
</fd:datatype>
My problem is that, when i input a non-valid date, it is accepted.
for example, if I input "32/12/2001", it is accepted as "01/01/2002". does anyone know a way to correct this?
Thanks a lot.