System.DateUtils.IsValidDateTime

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

function IsValidDateTime(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall IsValidDateTime(const System::Word AYear, const System::Word AMonth, const System::Word ADay, const System::Word AHour, const System::Word AMinute, const System::Word ASecond, const System::Word AMilliSecond);

プロパティ

種類 可視性 ソース ユニット
function public
System.DateUtils.pas
System.DateUtils.hpp
System.DateUtils System.DateUtils

説明

指定された年,月,日,時,分,秒,およびミリ秒が有効な日付と時刻を表しているかどうかを示します。

IsValidDateTime は,以下の場合に true を返します。

AYear が 1 ~ 9999 の範囲内にある

AMonth が 1 ~ 12 の範囲内にある

ADay が 1 から指定された月の日数までの範囲内にある

AHour が 0 ~ 24 の範囲内にある。AHour が 24 の場合,AMinute,ASecond,および AMilliSecond はすべて 0 でなければならない

AMinute が 0 ~ 59 の範囲内にある

ASecond が 0 ~ 59 の範囲内にある

AMilliSecond が 0 ~ 999 の範囲内にある

それ以外の場合,IsValidDateTime は false を返します。

関連項目