* Fix case for negative dates (bug ID 23464)

git-svn-id: trunk@27124 -
This commit is contained in:
michael 2014-03-13 09:42:01 +00:00
parent ed56f3c9b1
commit f9bb91d722

View File

@ -160,7 +160,10 @@ begin
end
else
begin
Date:=Date+1/(msecsperday*2);
if Date>0 then
Date:=Date+1/(msecsperday*2)
else
Date:=Date-1/(msecsperday*2);
j := pred((Trunc(System.Int(Date)) + 693900) SHL 2);
ly:= j DIV 146097;
j:= j - 146097 * cardinal(ly);