Show: Delphi C++
Display Preferences

System.DateUtils.IsValidTime

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

extern DELPHI_PACKAGE bool __fastcall IsValidTime(const System::Word AHour, const System::Word AMinute, const System::Word ASecond, const System::Word AMilliSecond);

Properties

Type Visibility Source Unit Parent
function public
System.DateUtils.pas
System.DateUtils.hpp
System.DateUtils System.DateUtils

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 Examples

Personal tools
In Other Languages
Previous Versions
Assistance