mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 18:09:30 +02:00
Fix for Mantis #24929.
rtl/sysutils/datih.inc: + add StrToDate overload which allows passing of specific TFormatSettings parameter rtl/sysutils/dati.inc: * implement new StrToDate overload by calling IntStrToDate similar to StrToTime git-svn-id: trunk@25392 -
This commit is contained in:
parent
38ae8c7250
commit
b288179d56
@ -502,6 +502,15 @@ begin
|
||||
Raise EConvertError.Create(Msg);
|
||||
end;
|
||||
|
||||
function StrToDate(const S: string; FormatSettings: TFormatSettings): TDateTime;
|
||||
var
|
||||
Msg: AnsiString;
|
||||
begin
|
||||
Result:=IntStrToDate(Msg,@S[1],Length(S),FormatSettings.ShortDateFormat,FormatSettings);
|
||||
if Msg<>'' then
|
||||
raise EConvertError.Create(Msg);
|
||||
end;
|
||||
|
||||
function StrToDate(const S: ShortString; const useformat : string; separator : char = #0): TDateTime;
|
||||
begin
|
||||
result := StrToDate(@S[1],Length(s),UseFormat,separator);
|
||||
|
@ -125,6 +125,7 @@ function StrToDate(const S: ShortString): TDateTime; {$ifdef SY
|
||||
function StrToDate(const S: Ansistring): TDateTime; {$ifdef SYSUTILSINLINE}inline;{$endif}
|
||||
function StrToDate(const S: ShortString; separator : char): TDateTime;{$ifdef SYSUTILSINLINE}inline;{$endif}
|
||||
function StrToDate(const S: AnsiString; separator : char): TDateTime; {$ifdef SYSUTILSINLINE}inline;{$endif}
|
||||
function StrToDate(const S: string; FormatSettings : TFormatSettings): TDateTime;
|
||||
function StrToTime(const S: Shortstring): TDateTime; {$ifdef SYSUTILSINLINE}inline;{$endif}
|
||||
function StrToTime(const S: Ansistring): TDateTime; {$ifdef SYSUTILSINLINE}inline;{$endif}
|
||||
function StrToTime(const S: ShortString; separator : char): TDateTime;{$ifdef SYSUTILSINLINE}inline;{$endif}
|
||||
|
Loading…
Reference in New Issue
Block a user