Subj : Julian to String Date To : Dan Egli From : Jasen Betts Date : Fri Jan 30 2004 06:18 am Hi Dan. 29-Jan-04 00:02:50, Dan Egli wrote to All DE> Hey all. I need someone to double check my logic here, if you please. I DE> am DE> writing a function that takes a julian date (i.e. 030) and returns the DE> String DE> Date it represents(i.e. 01/30/). I wrote this function to do DE> it. I am sure there is a more elegant way but I can not think of it. if there's some extremely elegent date code in numerical methods in pascal. DE> Basically I don't care as long as it works. So I want someone to double BE> check it to see if they can see any flaws in my logic (entirely possible!) it looks OK, but I don't recall the lengths of all the months... a couple of comments. DE> if (((Y mod 4) = 0) and (Y mod 100) >0)) or (Y mod 400) = 0) then DE> IsLeap := true DE> else DE> IsLeap := false; you could just say isleap := (((Y mod 4) = 0) and (Y mod 100) >0)) or (Y mod 400) = 0); DE> if (Work > 31) then DE> begin DE> inc(M); DE> Dec(Work, 31); DE> end; I'd have used an array constant with the sizes of the months. and a while loop... -=> Bye <=- --- * Origin: Black Holes were created when God divided by zero! (3:640/1042) .