Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid warning on parameter name #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Source/SysUtils.DateTime.pas
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ function StrToTimeDef(const S: DelphiString; const aDefault: TDateTime; const aF
function TryStrToTime(const S: DelphiString; out aValue: TDateTime): Boolean; inline;
function TryStrToTime(const S: DelphiString; out aValue: TDateTime; const aFormatSettings: TFormatSettings): Boolean;

function FormatDateTime(const Format: DelphiString; DateTime: TDateTime): DelphiString; inline;
function FormatDateTime(const Format: DelphiString; DateTime: TDateTime; const aFormatSettings: TFormatSettings): DelphiString;
procedure DateTimeToString(var aResult: DelphiString; const Format: DelphiString; DateTime: TDateTime); inline;
procedure DateTimeToString(var aResult: DelphiString; const Format: DelphiString; DateTime: TDateTime; const aFormatSettings: TFormatSettings);
function FormatDateTime(const AFormat: DelphiString; DateTime: TDateTime): DelphiString; inline;
function FormatDateTime(const AFormat: DelphiString; DateTime: TDateTime; const aFormatSettings: TFormatSettings): DelphiString;
procedure DateTimeToString(var aResult: DelphiString; const AFormat: DelphiString; DateTime: TDateTime); inline;
procedure DateTimeToString(var aResult: DelphiString; const AFormat: DelphiString; DateTime: TDateTime; const aFormatSettings: TFormatSettings);

function DateTimeToUnix(const aValue: TDateTime): Int64;
function UnixToDateTime(const aValue: Int64): TDateTime;
Expand Down Expand Up @@ -516,19 +516,19 @@ function TryStrToTime(const S: DelphiString; out aValue: TDateTime; const aForma
{$ENDIF}
end;

function FormatDateTime(const Format: DelphiString; DateTime: TDateTime): DelphiString;
function FormatDateTime(const AFormat: DelphiString; DateTime: TDateTime): DelphiString;
begin
result := FormatDateTime(Format, DateTime, FormatSettings);
result := FormatDateTime(AFormat, DateTime, FormatSettings);
end;

function FormatDateTime(const Format: DelphiString; DateTime: TDateTime; const aFormatSettings: TFormatSettings): DelphiString;
function FormatDateTime(const AFormat: DelphiString; DateTime: TDateTime; const aFormatSettings: TFormatSettings): DelphiString;
begin
DateTimeToString(var result, Format, DateTime, aFormatSettings);
DateTimeToString(var result, AFormat, DateTime, aFormatSettings);
end;

procedure DateTimeToString(var aResult: DelphiString; const Format: DelphiString; DateTime: TDateTime);
procedure DateTimeToString(var aResult: DelphiString; const AFormat: DelphiString; DateTime: TDateTime);
begin
DateTimeToString(var aResult, Format, DateTime, FormatSettings);
DateTimeToString(var aResult, AFormat, DateTime, FormatSettings);
end;

function FixFormatString(aFormat: DelphiString): DelphiString;
Expand All @@ -554,13 +554,13 @@ function FixFormatString(aFormat: DelphiString): DelphiString;
end;
end;

procedure DateTimeToString(var aResult: DelphiString; const Format: DelphiString; DateTime: TDateTime; const aFormatSettings: TFormatSettings);
procedure DateTimeToString(var aResult: DelphiString; const AFormat: DelphiString; DateTime: TDateTime; const aFormatSettings: TFormatSettings);
begin
var lYear, lMonth, lDay, lHour, lMin, lSec, lMSec: Word;
DecodeDateTime(DateTime, out lYear, out lMonth, out lDay, out lHour, out lMin, out lSec, out lMSec);
var lFormat := Format;
if not DelphiString.IsNullOrEmpty(Format) then
lFormat := FixFormatString(Format);
var lFormat := AFormat;
if not DelphiString.IsNullOrEmpty(AFormat) then
lFormat := FixFormatString(AFormat);
{$IF COOPER}
var lCalendar := java.util.Calendar.getInstance;
lCalendar.set(lYear, lMonth - 1, lDay, lHour, lMin, lSec);
Expand Down