harryk@bucsf.bu.edu (Harry Karayiannis) (03/11/90)
Hi world...
perhaps this has been asked before but I really need to know if there
is a formula which returns the 1st day of a given month in a given
year!
(i.e.
-Input: YEAR = 1990
MONTH = 1 (January)
-Output: DAY = ??formula?? = 2 (Monday)
)
I think that Dave Shumacher (the author of DLibs) had found such a formula
and he had talked about it in the net...but unfortunately i missed that dis-
cusion!
So if anyone remembers it (or knows a different one) PLEASE send me E-mail
Thank You!!
PS: If your mail to the above address bounces try: cscrzcc@buacca.bu.edueer36024@uxa.cso.uiuc.edu (03/13/90)
This may be more than what you need. This converts a year, month, and day to a "Julian Day" number. A Julian Day number MOD 7 = 0=Monday to 6=Sunday. ALL '/'s = DIV, i.e. A/B = A DIV B = TRUNC(A/B) JD = 367*Y - 7*(Y+(M+9)/12)/4 - 3*((Y+(M-9)/7)/100+1)/4 + 275*M/9+D+1721029