在网页里如何连接用Intraweb做的网页应用程序(表格)??? 谢谢(50分)

  • 主题发起人 主题发起人 mazheng
  • 开始时间 开始时间
procedure TForm1.FormCreate(Sender: TObject);
var
year,month,day: word;
startday,endday: tdatetime;
d: tdatetime;
begin
decodedate(date,year,month,day);
startday := encodedate(year,1,1);
endday := encodedate(year,12,31);
d := startday;
while d <= endday do
begin
if dayofweek(d) = 4 then //注意看设置,看一周是从哪天开始,默认sunday是一周的开始
showmessage(datetostr(d));
d := d+1;
end;
 
procedure TForm1.FormCreate(Sender: TObject);
var
year,month,day: word;
startday,endday: tdatetime;
d: tdatetime;
begin
decodedate(date,year,month,day);
startday := encodedate(year,1,1);
endday := encodedate(year,12,31);
d := startday;
while d <= endday do
begin
if dayofweek(d) = 5 then //注意看设置,看一周是从哪天开始,默认sunday是一周的开始
showmessage(datetostr(d));
d := d+1;
end;
 
uses DateUtils, Types;

procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
FirstDate: TDateTime;
Year, Month, Day: Word;
begin
ListBox1.Clear;
DecodeDate(Today, Year, Month, Day);
FirstDate := EncodeDate(Year, 1, 1); //今年的第一天
//七天之内必有一个星期四
for i := 1 to 7 do begin
FirstDate := IncDay(FirstDate);
if DayOfWeek(FirstDate) = 5 then break;
end;
ListBox1.Items.Add(FormatDateTime('dddddd', FirstDate));
//利用周期性,从第一个星期四开始后的线隔七天均是星期四
for i := 1 to WeeksInYear(Today) do begin
FirstDate := IncDay(FirstDate, DaysPerWeek);
if CompareDate(FirstDate, EndOfTheYear(Today)) = LessThanValue then
ListBox1.Items.Add(FormatDateTime('dddddd', FirstDate));
end;
end;
 
后退
顶部