🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #1067

Re: Calculating ages

#1067
From: Bob McKay
Date: Mon, 20 Aug 1990 01:08
16 lines
1323 bytes
From article <982@christopher-robin.cs.bham.ac.uk>, by cjr@cs.bham.ac.uk (Chris Ridd <RiddCJ>):
> 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.  

Unfortunately, there is no single answer as the problem is not well formulated. 
Take the example of someone born on the 28th February, 1988. What is their age 
on the 1st March, 1989? Is it:
1 year from 28/2/88 to 28/2/89 + 1 day from 28/2/89 to 1/3/89
	or
2 days from 28/2/88 to 1/3/88 + 1 year from 1/3/88 to 1/3/89
	Cheers
Bob McKay		   Phone:	+61 6 268 8169	    fax: +61 6 268 8581
Dept. Computer Science		ACSNET,CSNET:	rim@csadfa.cs.adfa.oz
Aust. Defence Force Academy	UUCP:	...!uunet!munnari!csadfa.cs.adfa.oz!rim
Canberra ACT 2600 AUSTRALIA	ARPA:	rim%csadfa.cs.adfa.oz@uunet.uu.net
Technical Details
Message-ID: <1832@ccadfa.adfa.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!munnari.oz.au!metro!usage.csd.unsw.oz.au!ccadfa!rim@csadfa.cs.adfa.oz.au
References: <982@christopher-robin.cs.bham.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!munnari.oz.au!metro!usage.csd.unsw.oz.au!ccadfa!rim@csadfa.cs.adfa.oz.au
From: rim@csadfa.cs.adfa.oz.au (Bob McKay)
Newsgroups: comp.lang.prolog,comp.lang.misc
Subject: Re: Calculating ages
Message-ID: <1832@ccadfa.adfa.oz.au>
Date: 20 Aug 90 01:08:33 GMT
References: <982@christopher-robin.cs.bham.ac.uk>
Sender: news@ccadfa.adfa.oz.au
Lines: 16