%function jd=juldayv(x)
%converts date to julian date; 0000 on jan 1=1.000
x=timex;
cov1=[0 31 59 90 120 151 182 213 244 274 305 335 ];
cov2=[0 31 60 91 121 152 183 214 245 275 306 336 ];
yr=x(1,:);
mnth=x(2,:);
day=x(3,:);
hr=x(4,:);
min=x(5,:);
sec=x(6,:);
[bq,nline]=size(yr);

for i=1:nline
	if fix(yr/4)==0
		jamx(i)=cov2(mnth(i));
	else
		jamx(i)=cov1(mnth(i));
	end;
end;
jd=jamx+day+hr/24+min/24/60+sec/24/3600;