mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-19 10:49:25 +02:00
* Fixed 18183
git-svn-id: trunk@17225 -
This commit is contained in:
parent
be484359b8
commit
f235e4c116
@ -358,7 +358,7 @@ var
|
|||||||
c:word;
|
c:word;
|
||||||
dp,mp,yp,which : Byte;
|
dp,mp,yp,which : Byte;
|
||||||
s1:string[4];
|
s1:string[4];
|
||||||
values:array[1..3] of longint;
|
values:array[0..3] of longint;
|
||||||
LocalTime:tsystemtime;
|
LocalTime:tsystemtime;
|
||||||
YearMoreThenTwoDigits : boolean;
|
YearMoreThenTwoDigits : boolean;
|
||||||
begin
|
begin
|
||||||
@ -402,12 +402,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if Which<>3 then
|
|
||||||
begin
|
|
||||||
FixErrorMsg(SErrIllegalDateFormatString,useformat);
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
{ Get actual values }
|
|
||||||
for i := 1 to 3 do
|
for i := 1 to 3 do
|
||||||
values[i] := 0;
|
values[i] := 0;
|
||||||
s1 := '';
|
s1 := '';
|
||||||
@ -448,6 +442,11 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
end ;
|
end ;
|
||||||
|
if (Which<3) and (N>Which) then
|
||||||
|
begin
|
||||||
|
FixErrorMsg(SInvalidDateFormat,s);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
// Fill in values.
|
// Fill in values.
|
||||||
getLocalTime(LocalTime);
|
getLocalTime(LocalTime);
|
||||||
ly := LocalTime.Year;
|
ly := LocalTime.Year;
|
||||||
|
Loading…
Reference in New Issue
Block a user