www.pudn.com > chebshev.zip > TimetoJD.m, change:2013-04-11,size:222b


function t=TimetoJD(Y,M,D,h,f,s) 
% if(Y>=80) 
%     Y=Y+1900; 
% else 
%     Y=Y+2000; 
% end 
if M<=2 
    Y=Y-1; 
    M=M+12; 
end 
JD=fix(365.25*Y)+fix(30.6001*(M+1))+D+h/24+f/1440+s/24/3600+1720981.5; 
t=JD-2444244.5;