Mistři v programování na #hovnokod

Delphi #624

procedure date_mask(date_edit:TEdit);
var s:string;
    i:integer;
begin
  case length(date_edit.Text) of
  2:begin
      date_edit.Text:=date_edit.Text+'.';
      date_edit.SelStart:=3;
    end;
  5:begin
      date_edit.Text:=date_edit.Text+'.';
      date_edit.SelStart:=6;
    end;
  end;

  if length(date_edit.Text)=10 then
  begin
    for i:=1 to 9 do
    begin
      s:=s+date_edit.Text[i];
    end;
    date_edit.Text:=s;
    date_edit.SelStart:=9;
  end;
end;

HovnoKod,