Also, to check that your users have entered the information correctly,
you'll probably have to use a RegExp to "pattern match" what is entered.
And *that* will depend on what format you use for your date - mm/dd/yy or
dd/mm/yy or mm/dd/yyyy or dd MMM yy or Month Date, Year or etc. (Do you see
my point?)
Once you've defined and explained your format, then it should be relatively
simple to "pattern match" the input to your format.
-Dwight
-----Original Message-----
From: siberian [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 4:18 PM
To: MODI,SMITA (HP-NewJersey,ex1)
Cc: '[EMAIL PROTECTED]'
Subject: Re: how to check date
Check CPAN for one of the many many date modules that are
they. I am sure
at least one will help you prove a dates validity.
John-
On Fri, 8 Dec 2000, MODI,SMITA (HP-NewJersey,ex1) wrote:
> Hi all,
>
> Does perl has any function that checks date is correct or
not?
>
> Actually I want to take date as user input but before
doing any thing I want
> to check that it is correct or not and I also want to
check that it is
> between certain dates.
>
> Is there any way to do this?
>
> Thanks in advance..
>
> Smita Modi
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
>
http://listserv.ActiveState.com/mailman/listinfo/activeperl
>
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl