You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by John Raley <jo...@moonlight.com> on 2001/04/02 20:07:09 UTC
Re: Validating dates
Hi William,
I noticed that you are hard-coding the date patterns in your convenience class. One major benefit of
the DateFormat class is that the VM can choose an appropriate pattern based on a Locale (either
explicitly specified, or the VM default which usually doesn't mean much in a web application). Is
there a reason the default patterns don't work for you?
John
William Jaynes wrote:
> Here are some utility methods I use for date validation and rendering to and from strings. Nothing
> fancy.
>
> ----- Original Message -----
> From: <Do...@enron.net>
> To: <st...@jakarta.apache.org>
> Sent: Thursday, March 29, 2001 2:53 PM
> Subject: Validating dates
>
> >
> >
> > Does anyone have a code example for validating a date field in the validate
> > method of actionform? Actually, a date in a string attribute.
> >
> > thanks in advance for your help,
> > Donnie Hall
> >
> >
>
> ------------------------------------------------------------------------
> Name: DateUtil.java
> DateUtil.java Type: unspecified type (application/octet-stream)
> Encoding: 7bit