Path: news.weeg.uiowa.edu!news.uiowa.edu!hobbes.physics.uiowa.edu!newsfeed.ksu.ksu.edu!moe.ksu.ksu.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!EU.net!uknet!lyra.csx.cam.ac.uk!pipex!connect!Tombo Newsgroups: comp.sys.apple2.programmer Subject: Days of week & No Slot Clock From: tombo@mail.on-line.co.uk (Richard King) Distribution: world Message-ID: Sender: tombo@mail.on-line.co.uk (Richard King) Organization: On-line Entertainment Date: Thu, 5 May 1994 15:28:53 GMT Lines: 25 The formula for calculating the day of the week from the year, month and day is known as Zeller's Congruence, and is performed by the following ANSI-C subroutine. int zeller(int day, int month, int year) /* determine day of week */ { int y1, y2; if (month < 3) { month += 10; year -= 1; } else month -= 2; y1 = year / 100; y2 = year % 100; return ((day + ((26 * month - 1) / 10) + y2 + y2 / 4 + y1 / 4 - 2 * y1 + 49) % 7); } Hope this solves any questions.