谢谢了。

解决方案 »

  1.   

    implementation
    type
     week=(sun,mon,tue,wed,thu,fri,sat);{$R *.dfm}procedure mday(x:week)
    begin
     procedure TForm1.FormCreate(Sender: TObject);
    var
     year,month,day:word;
    begin
     decodedate(date,year,month,day);
     edit1.Text:=format('%d年%d月%d日',[year,month,day]);
    end;procedure TForm1.Button1Click(Sender: TObject);
    var
     today,yesterday,tomorrow:week;
     n:integer;
    begin
     n:=dayofweek(now);
     case n of
      1:today:=sun;
      2:today:=mon;
      3:today:=tue;
      4:today:=wed;
      5:today:=thu;
      6:today:=fri;
      7:today:=sat;
     end;
     if today=low(week) then
       yesterday:=high(week)
     else
       yesterday:=pred(today);
     if today=high(week) then
       tomorrow:=low(week)
     else
       tomorrow:=succ(today);
     case(sender as tbutton).Tag of
       1:button1.Caption:='昨天是'+?????;
       2:button2.Caption:='今天是'+?????;
       3:button3.Caption:='明天是'+?????;
     end;