...find the number of days in actual month?
Author: ChoYi Lin
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;
printed from
www.swissdelphicenter.ch
developers knowledge base