day of week

salvatore.savastano sfs at cbnewsm.att.com
Sat Sep 22 09:28:13 AEST 1990


I have a function that works as follows:
        If the parameter passed is zero it returns the current 
	time in UNIX long as in time(2);
        otherwise the value passed is considered to be in the format
        YYMMDD and returns the number of days since Jan 1, 1970

using this as a basis, does anyone have a program or an
algorithm that for a parameter also specified as a date in
YYMMDD format, will return the day of the week on which that date 
orrurred?
e.g.:  
		date = "900927"
		f(date) --->> "fri" ( or some code, e.g.: 5)


sal savastano
att!somerset!pisc7c!sfs



More information about the Comp.lang.c mailing list