mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 23:49:13 +02:00
TAChart: Fix function IncQuarter calculation error for negative NumberOfQuarters.
This commit is contained in:
parent
e0f086d2e0
commit
59aff202e1
@ -510,14 +510,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function IncQuarter(ADate: TDateTime; NumberOfQuarters: Integer): TDate;
|
function IncQuarter(ADate: TDateTime; NumberOfQuarters: Integer): TDate;
|
||||||
var
|
|
||||||
y, m, d: Word;
|
|
||||||
begin
|
begin
|
||||||
DecodeDate(ADate, y,m,d);
|
Result := IncMonth(ADate, NumberOfQuarters*3);
|
||||||
m := (((m - 1) div 3) + NumberOfQuarters) * 3;
|
|
||||||
inc(y, m div 12);
|
|
||||||
m := m mod 12 + 1;
|
|
||||||
Result := EncodeDate(y, m, 1);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function InterpolateRGB(AColor1, AColor2: Integer; ACoeff: Double): Integer;
|
function InterpolateRGB(AColor1, AColor2: Integer; ACoeff: Double): Integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user