Back to Devexpress

CheckDay(Integer,Integer,Integer) Method

vcl-cxdateutils-dot-checkday-x28-fc221108-x29.md

latest1.1 KB
Original Source

CheckDay(Integer,Integer,Integer) Method

Returns the valid day for a specific date.

Declaration

delphi
function CheckDay(AYear: Integer; AMonth: Integer; ADay: Integer): Integer;

Parameters

NameType
AYearInteger
AMonthInteger
ADayInteger

Returns

Type
Integer

Remarks

The CheckDay function returns the valid day for the date defined by the AYear, AMonth and ADay parameters. If the ADay parameter is less than 1, the function returns the first day of the month, i.e. 1. If it is greater than the total number of days in a given month and year, CheckDay returns the last day of the month. Otherwise, the ADay parameter is a valid day returned by the function.

See Also

cxDateUtils Unit