Article View: comp.lang.prolog
Article #1065Calculating ages
From: Chris Ridd <RiddCJ>
Date: Fri, 17 Aug 1990 13:26
Date: Fri, 17 Aug 1990 13:26
12 lines
943 bytes
943 bytes
Does anyone know how to calculate a person's age in Prolog (well, any language will do)? We are given today's date and their birthday, and need the answer in years, weeks and days. We can think of various problems with leap-years and so on, but can't find any references or algorithms. Chris -- Chris Ridd, Computer Science, Birmingham Uni, UK -- RiddCJ@Cs.Bham.Ac.Uk -- "'It's going to look pretty good, then, isn't it,' said War testily, 'the One Horseman and Three Pedestrians of the Apocralypse.'" - Sourcery
Technical Details
Message-ID:
<982@christopher-robin.cs.bham.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!warwick!nott-cs!christopher-robin.cs.bham.ac.uk!cjrShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!warwick!nott-cs!christopher-robin.cs.bham.ac.uk!cjr From: cjr@cs.bham.ac.uk (Chris Ridd <RiddCJ>) Newsgroups: comp.lang.prolog,comp.lang.misc Subject: Calculating ages Message-ID: <982@christopher-robin.cs.bham.ac.uk> Date: 17 Aug 90 13:26:30 GMT Reply-To: cjr@christopher-robin.UUCP (Chris Ridd <RiddCJ>) Organization: University of Birmingham, England Lines: 12