Gossamer Forum
Home : Products : Gossamer Links : Discussions :

date_is_valid() - how does it work?

Quote Reply
date_is_valid() - how does it work?
hello!

If I enter either of the following to the date_is_valid routine it returns the same result.

my $result = date_is_valid('2004-06-10 10:30:20');
my $result = date_is_valid('2004-06-98 10:30:20');

Does this subroutine just check the formatting? or for real dates?

Obviously the 98th of June isn't a real date so I would have thought that would return an error?

regan.
Quote Reply
Re: [ryel01] date_is_valid() - how does it work? In reply to
I think it works more on a UNIX timestamp. So, basically you need to convert the date into UNIX format (something like date2unix or similar), and then do the checks from there.

Never really played with that function though (only the "add" and "remove" day routines .. which I can't remember the names of...LOL).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!