* Fix bug ID #31814, StrToDateTimeDef with FormatSettings parameter

git-svn-id: trunk@36214 -
This commit is contained in:
michael 2017-05-15 13:10:56 +00:00
parent bd9978f9cf
commit 06227c9557
2 changed files with 7 additions and 1 deletions

View File

@ -1433,7 +1433,12 @@ end;
function StrToDateTimeDef(const S: ShortString; const Defvalue : TDateTime): TDateTime;
begin
if not TryStrToDateTime(s,Result) Then
Result:=StrToDateTimeDef(S,DefValue,DefaultFormatSettings);
end;
function StrToDateTimeDef(const S: AnsiString; const Defvalue : TDateTime; const FormatSettings: TFormatSettings): TDateTime;
begin
if not TryStrToDateTime(s,Result,FormatSettings) Then
result:=defvalue;
end;

View File

@ -188,6 +188,7 @@ function StrToDateDef(const S: AnsiString; const Defvalue : TDateTime; separator
function StrToTimeDef(const S: AnsiString; const Defvalue : TDateTime): TDateTime; {$ifdef SYSUTILSINLINE}inline;{$endif}
function StrToTimeDef(const S: AnsiString; const Defvalue : TDateTime; separator : char): TDateTime; {$ifdef SYSUTILSINLINE}inline;{$endif}
function StrToDateTimeDef(const S: AnsiString; const Defvalue : TDateTime): TDateTime; {$ifdef SYSUTILSINLINE}inline;{$endif}
function StrToDateTimeDef(const S: AnsiString; const Defvalue : TDateTime; const FormatSettings: TFormatSettings): TDateTime; {$ifdef SYSUTILSINLINE}inline;{$endif}
function CurrentYear:Word;
{ FPC Extra }