date_valid_datetime

Returns whether a given datetime is valid.

Syntax:

date_valid_datetime(year, month, day, hour, minute, second);


Argument Description
year The year to check.
month The month to check.
day The day to check.
hour The hour to check.
minute The minute to check.
second The second to check.


Returns: Boolean


Description

With this function you can check a datetime value to see if it is valid (returns true) or not (returns false).


Example:

if date_valid_datetime(2011, 9, 15, 10, 3, 30))
   {
   mydatetime = date_create_datetime( 2011, 9, 15, 10, 3, 30 );
   }

This will set "mydatetime" to 15th September 2011, 10:03.30, if it is a valid value (which it is).


Back: Date And Time
Next: date_date_of
© Copyright YoYo Games Ltd. 2015 All Rights Reserved