Determines if the given datetime is a real date and time.
IsValid = SRP_DateTime( "Validate" , Year, Month, Day, Hour, Minute, Second) |
Returns
1 if the components represent an actual calendar date and actual time, 0 if not.
Parameters
Year | A calendar year. (REQUIRED) |
Month | A calendar month. (REQUIRED) |
Day | A day for the given month. (REQUIRED) |
Hour | An hour. 0 - 23. (REQUIRED) |
Minute | A minute. 0 - 59. (REQUIRED) |
Second | A second. 0 - 59 (REQUIRED) |
Remarks
The "Validate" service determines if the the given components represent a valid calendar date and time. If even just one component is "out of bounds," then 0 is returned. Leap years is taken into account.
Examples
// Validate a datetime IsValid = SRP_DateTime( "Validate" , 1941 , 12 , 8 , 7 , 51 , 43 ) |