L
lindeping
Unregistered / Unconfirmed
GUEST, unregistred user!
统计一段时间段内有几个星期天的函数:
function countsun(var date1,date2:tdate):integer;
var i,j:integer;
begin
i:=dayofweek(date1);
j:=dayofweek(date2);
result:=floor(floor(date2-date1)/7);
if (i=1) or (j=1) then
result:=result+1;
end;
function countsun(var date1,date2:tdate):integer;
var i,j:integer;
begin
i:=dayofweek(date1);
j:=dayofweek(date2);
result:=floor(floor(date2-date1)/7);
if (i=1) or (j=1) then
result:=result+1;
end;