unitpub.pas

来自「一个音像租赁店铺的管理软件,可以维护影片库信息和会员信息,及日常业务的实现(出租」· PAS 代码 · 共 38 行

PAS
38
字号
unit UnitPub;

interface


  { Global Fuctions }

function GetInterval(SrcDT:TDateTime;DesDT:TDateTime):Integer;

implementation

function GetInterval(SrcDT:TDateTime;DesDT:TDateTime):Integer;
var
  tmpDT:TDateTime;
  i:Integer;
Begin
  tmpDT:=DesDT-SrcDT;
  i:=1;
  if tmpDT<1 then
    begin
      result:=1;
      Exit;
    end;
  while tmpDT>1 do
    begin
      tmpDT:=tmpDT-i;
      if tmpDT<1 then
      begin
        result:=i;
        Exit;
      end;
      i:=i+1;
    end;
End;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?