mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 22:09:32 +02:00
* fix for DateTimeToJulianDate and JulianDateToDateTime for integer=smallint
git-svn-id: trunk@27103 -
This commit is contained in:
parent
6deb0b35b5
commit
c88cebfc97
@ -2044,7 +2044,7 @@ end;
|
|||||||
Function DateTimeToJulianDate(const AValue: TDateTime): Double;
|
Function DateTimeToJulianDate(const AValue: TDateTime): Double;
|
||||||
var
|
var
|
||||||
day,month,year: word;
|
day,month,year: word;
|
||||||
a,y,m: integer;
|
a,y,m: longint;
|
||||||
begin
|
begin
|
||||||
DecodeDate ( AValue, year, month, day );
|
DecodeDate ( AValue, year, month, day );
|
||||||
a := (14-month) div 12;
|
a := (14-month) div 12;
|
||||||
@ -2064,7 +2064,7 @@ end;
|
|||||||
|
|
||||||
Function TryJulianDateToDateTime(const AValue: Double; out ADateTime: TDateTime): Boolean;
|
Function TryJulianDateToDateTime(const AValue: Double; out ADateTime: TDateTime): Boolean;
|
||||||
var
|
var
|
||||||
a,b,c,d,e,m:integer;
|
a,b,c,d,e,m:longint;
|
||||||
day,month,year: word;
|
day,month,year: word;
|
||||||
begin
|
begin
|
||||||
a := trunc(AValue + 32044.5);
|
a := trunc(AValue + 32044.5);
|
||||||
|
Loading…
Reference in New Issue
Block a user