Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!aurora!labrea!decwrl!pyramid!prls!philabs!gcm!dc From: dc@gcm (Dave Caswell) Newsgroups: comp.misc Subject: Re: Julian Date/Day Number Message-ID: <378@white.gcm> Date: Sat, 14-Nov-87 18:08:36 EST Article-I.D.: white.378 Posted: Sat Nov 14 18:08:36 1987 Date-Received: Sun, 15-Nov-87 22:41:39 EST References: <557@astroatc.UUCP> <6205@ihlpa.ATT.COM> Reply-To: dc@white.UUCP (Dave Caswell) Organization: Greenwich Capital Markets, Greenwich, CT Lines: 20 Keywords: Ceasar, Astronomy, Dates, Etc. In article <6205@ihlpa.ATT.COM> rjh@ihlpa.UUCP (45261-Herber,R.J.) writes: >I am including a program that computes the astronomical Julian Date >using the Roman Catholic church's definition of when the switch >between the Julian and the Georgian calendars occurred, i.e. Oct 4, >1582 Old Style was followed by Oct 15, 1582 New Style. > Much complicated code follows. I am including a version that couldn't care less when day one is; because you will probably only be using it to find the number of days between two dates. This is the code I use for "Julian dates". Mail me if you can't, or don't want to, write the inverse function(it's more than three lines). julian(d, m, y) int d,m,y; if (m>2) return(1461 * y / 4 + 153 * (m+1) / 5 + d); return(1461 * (y-1) / 4 + 153 * (m+13) / 5 + d); }