* fix for DateTimeToJulianDate and JulianDateToDateTime for integer=smallint

git-svn-id: trunk@27103 -
This commit is contained in:
nickysn 2014-03-11 21:51:57 +00:00
parent 6deb0b35b5
commit c88cebfc97

View File

@ -2044,7 +2044,7 @@ end;
Function DateTimeToJulianDate(const AValue: TDateTime): Double;
var
day,month,year: word;
a,y,m: integer;
a,y,m: longint;
begin
DecodeDate ( AValue, year, month, day );
a := (14-month) div 12;
@ -2064,7 +2064,7 @@ end;
Function TryJulianDateToDateTime(const AValue: Double; out ADateTime: TDateTime): Boolean;
var
a,b,c,d,e,m:integer;
a,b,c,d,e,m:longint;
day,month,year: word;
begin
a := trunc(AValue + 32044.5);