Time to

time( hour, minute )

Return the difference between current local time and the given time.

Description

time( hour, minute )

This function returns the difference in minutes between the current local time of the controller and the time given in the command.

Parameters

hour Hour (0-23)
minute Minute (0-59)

Return value

Returns the difference in minutes between the current local time of the controller and the given time. The return value is the difference in minutes, in the range -720 to 720. The return value will be negative if the given time is in the future, and positive if the given time is in the past.

Example usage

Assuming local time is 22:00;

time( 21, 45 )  // returns 15
time( 2, 30 )  // returns -270