Are you drunk again? (=
It does understand leap years.
2004 is a leap year. which means 2/29/04 is a valid date. which means
2/29/03 is not.
so, with lenient(true) 2/29/03 -> 3/1/03, 2/29/04 -> 2/29/04
with lenient(false) 2/29/03 -> exception; 2/29/04 -> 2/29/04
That's the purpose of lenient.
----- Original Message -----
From: "Mark Galbreath" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, July 24, 2003 7:10 AM
Subject: RE: Birthdate validation ?
I don't have time for frivolous exercises, but seeing how easy it is to
accommodate leap years, I would be shocked to find this functionality
missing from Calendar. What is the point of setLenient() if Calendar cannot
tell the diff between leap and non-leap years?
Mark
-----Original Message-----
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 4:42 PM
To: 'Struts Users Mailing List'
Subject: RE: Birthdate validation ?
Try it and find out for yourself. It does produce 3/1/2003.
-Richard
-----Original Message-----
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 1:32 PM
To: 'Struts Users Mailing List'
Subject: RE: Birthdate validation ?
What makes you say that? Why would Calendar make 2/29 3/1?
-----Original Message-----
From: Alex Shneyderman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 8:21 PM
Be carefull with that because if you set Feb 29, 2003 your date is going to
be March 1, 2003 and Calendar will not say a thing. You should probably fix
a birthdate validator.
> -----Original Message-----
> From: Adam Levine [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 23, 2003 2:18 PM
>
> Use Calendar, more than likely the concrete GregorianCalendar.
>
> Calendar.setField(<field>, <field value>); x3
>
> Calendar.getTime() -> Date
>
>
> From: Erez Efrati <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: Birthdate validation ?
> Date: Wed, 23 Jul 2003 21:03:53 +0200
>
> I have a birth date field composed of three different fields of day
> month and a year. Now, what is the best way to receive those three and
> combine them into a java.sql.Date class and performing validation
> using the validator?
>
> Hope someone been there done that..
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]