自己写一个吧,很简单的。
function DaysInMonth(odate: tDateTime): integer;
var
year, month, day: word;
fDate: TDateTime;
eDate: TDateTime;
begin
DecodeDate(oDate, year,month,day);
day:=1;
fDate:=EncodeDate(year,month,day);
eDate:=IncMonth(fDate,1);
Result:= eDate-fDate-1;
end;