mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-29 04:11:06 +02:00
small clean ups
git-svn-id: trunk@5519 -
This commit is contained in:
parent
e5c8fce19e
commit
ccec99fefc
@ -25,8 +25,8 @@ unit AboutFrm;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, LResources, StdCtrls,
|
||||
Buttons, LazConf, LazarusIDEStrConsts;
|
||||
Classes, SysUtils, FPCAdds, Forms, Controls, Graphics, Dialogs, LResources,
|
||||
StdCtrls, Buttons, LazConf, LazarusIDEStrConsts;
|
||||
|
||||
type
|
||||
TAboutForm = class(TForm)
|
||||
@ -71,15 +71,15 @@ constructor TAboutForm.Create(AOwner: TComponent);
|
||||
var
|
||||
BuildDate: string;
|
||||
SlashPos1, SlashPos2: integer;
|
||||
Date: TDate;
|
||||
Date: TDateTime;
|
||||
begin
|
||||
BuildDate := {$I %date%};
|
||||
SlashPos1 := Pos('/',BuildDate);
|
||||
SlashPos2 := SlashPos1 +
|
||||
Pos('/', Copy(BuildDate, SlashPos1+1, Length(BuildDate)-SlashPos1));
|
||||
Date := EncodeDate(StrToInt(Copy(BuildDate,1,SlashPos1-1)),
|
||||
StrToInt(Copy(BuildDate,SlashPos1+1,SlashPos2-SlashPos1-1)),
|
||||
StrToInt(Copy(BuildDate,SlashPos2+1,Length(BuildDate)-SlashPos2)));
|
||||
Date := EncodeDate(StrToWord(Copy(BuildDate,1,SlashPos1-1)),
|
||||
StrToWord(Copy(BuildDate,SlashPos1+1,SlashPos2-SlashPos1-1)),
|
||||
StrToWord(Copy(BuildDate,SlashPos2+1,Length(BuildDate)-SlashPos2)));
|
||||
Result := DateTimeToStr(Date);
|
||||
end;
|
||||
begin
|
||||
|
@ -37,8 +37,22 @@ type
|
||||
{$IFDEF VER1_0}
|
||||
PCardinal = ^Cardinal;
|
||||
{$ENDIF}
|
||||
|
||||
function StrToWord(const s: string): word;
|
||||
|
||||
implementation
|
||||
|
||||
function StrToWord(const s: string): word;
|
||||
var
|
||||
p: Integer;
|
||||
begin
|
||||
Result:=0;
|
||||
p:=1;
|
||||
while (p<=length(s)) do begin
|
||||
Result:=Result*10+ord(s[p])-ord('0');
|
||||
inc(p);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user