jsulliva@cvbnet.UUCP (Jeff Sullivan, x4096 MS 4-2) (02/03/90)
I am looking for the algorithm (or C source) to figure
out the day of the week given a particular date. Such
an algorithm is used in most calendar programs, such as
'cal' in Unix.
For example:
12/25/1960 Sunday
2/2/2000 Wednesday
One simple (brute-force) way is to reset the date in
your program and get the time (tm structure).
int tm_wday; /* day of week (Sunday = 0) */
There's gotta be a better way!
Thanks in advance,
-Jeff