DateUtils.IsValidTime

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From DateUtils.pas

	function IsValidTime(const AHour: Word;
		const AMinute: Word;
		const ASecond: Word;
		const AMilliSecond: Word): Boolean;


Unit: DateUtils

Type: function

Visibility: public

C++ Information

From DateUtils.hpp

	bool __fastcall IsValidTime(unsigned short AHour,
		unsigned short AMinute,
		unsigned short ASecond,
		unsigned short AMilliSecond);


Unit: DateUtils

Type: function

Description

Indicates whether a specified hour, minute, second, and millisecond represent a valid date and time.


IsValidTime returns True if:

  • AHour falls in the range from 0 through 24, and if AHour is 24, then AMinute, ASecond, and AMilliSecond must all be 0.
  • AMinute falls in the range from 0 through 59 inclusive.
  • ASecond falls in the range from 0 through 59 inclusive.
  • AMilliSecond falls in the range from 0 through 999 inclusive.

Otherwise, IsValidTime returns False.

See Also

Code Samples


Personal tools
Translations
Newest Version