function f = jd(y,m,d)
% function f = jd(y,m,d)
% Function calculates the Julian date at year y (YYYY), month m, and day d.
% (Gregorian calendar) From Meeus...
% by kaj.wiik@hut.fi (23 Oct 1995)
% 

y = y - ((m==1) + (m==2) > 0);
m = m + 12.*(((m==1) + (m==2)) > 0);

a = fix(y./100);
b = 2 - a + fix(a./4);

f = fix(365.25.*(y + 4716)) + fix(30.6.*(m + 1)) + d + b - 1524.5;

%endfunction