是你自己问得不清不楚,可怪不了别人。
看看我的函数。
function TForm1.WeekNumber(D: TDate): integer;
var
Year, Month, Day , Week: Word;
FirstDate:TDate;
begin
DecodeDate( D, Year, Month, Day );
FirstDate:=StrToDate(IntToStr(Year)+'-1-1');
Week:=DayOfWeek(FirstDate)-1;
Result:=((Round(d-FirstDate)-1+week) div 7)+1;
end;