struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Galbreath" <mark_galbre...@qat.com>
Subject RE: Birthdate validation ?
Date Thu, 24 Jul 2003 13:09:35 GMT
That's my point; why ru arguing with me? *hic*


-----Original Message-----
From: Adam L [mailto:adam_l_levine@hotmail.com] 
Sent: Thursday, July 24, 2003 8:54 AM
To: Struts Users Mailing List
Subject: Re: Birthdate validation ?


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" <mark_galbreath@qat.com>
To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
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:Yeerk@osd.pentagon.mil]
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:mark_galbreath@qat.com]
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:alex@law.columbia.edu]
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:adam_l_levine@hotmail.com]
> 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 <ereze@netmedia.net.il>
> Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> To: 'Struts Users Mailing List' <struts-user@jakarta.apache.org>
> 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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message