...find the number of days in actual month?
|
Autor:
ChoYi Lin |
[ Print tip
] | | |
function DaysInMonth: Integer;
var
Year, Month, Day: Word;
begin
DecodeDate(Now, Year, Month, Day);
Result := MonthDays[IsLeapYear(Year), Month];
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(IntToStr(DaysInMonth));
end;
|