Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!iuvax!rutgers!att!cbnewsm!sfs From: sfs@cbnewsm.att.com (salvatore.savastano) Newsgroups: comp.lang.c Subject: day of week Message-ID: <1990Sep21.232813.2516@cbnewsm.att.com> Date: 21 Sep 90 23:28:13 GMT Distribution: usa Organization: AT&T Bell Laboratories Lines: 18 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