Kod: Tümünü seç
procedure JD;
var
gun,ay,yil:extended;
saat,dakika,saniye:extended;
c:integer;
begin
gun:=strtoint(copy(datetostr(date),1,2));
ay:=strtoint(copy(datetostr(date),4,2));
yil:=strtoint(copy(datetostr(date),7,4));
gun:=strtoint(copy(timetostr(time),1,2));
ay:=strtoint(copy(timetostr(time),4,2));
yil:=strtoint(copy(timetostr(time),7,4));
if ay=1 then C :=0;
if ay=2 then C :=31;
if ay=3 then C :=59;
if ay=4 then C :=90;
if ay=5 then C :=120;
if ay=6 then C :=151;
if ay=7 then C :=181;
if ay=8 then C :=212;
if ay=9 then C :=243;
if ay=10 then C :=273;
if ay=11 then C :=304;
if ay=12 then C :=334;
JD :=(2415020+(365*(Yil-1900))+C+gun+(((((Saniye/60)+Dakika)/60)+Saat)/24)+Int((Yil-1900)/4)-0.5);
end;
İstediğim jd hesaplayan bir fonksiyon yazmak. Programın içinde nerde JD yazarsam orda bana bi extended halde Julian Date versin...
Bu yazdığım kodda nerede hata yapıyorum acaba???