Thank you for your help.
Regards,
Yves

"Thomas Klausner" <[EMAIL PROTECTED]> a écrit dans le message de
news:[EMAIL PROTECTED]
> Hi!
>
> On Tue, Aug 31, 2004 at 01:57:36PM +0200, Cartensy wrote:
>
> > I am looking for a perl module which can validate a given date.
> > For example, return 0 if I call the module with a date like 2003/02/30.
>
> I'd suggest DateTime:
>
>
> use DateTime;
>
> print validate_date();
>
> sub validate_date {
>     my $dt;
>     eval {
>        $dt=DateTime->new(year=>2003,month=>02,day=>30);
>     };
>     return 0 if $@;
>     return $dt;
> }
>
>
>
> -- 
> #!/usr/bin/perl                               http://domm.zsi.at
> for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}


Reply via email to