* Date Function Miscalculations

Homeless Posts from the old forum system
Locked
User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Date Function Miscalculations

Post by tatewise » 13 Sep 2010 14:51

The =Year(), =DayNumber(), =Timespan() Functions MISCALCULATE Gregorian B.C. years!!
They seem to ignore the A.D. and B.C. selection.

The =Timespan() Function MISCALCULATES Quarter dates.
It seems to ignore the Q1-4 completely!!

The =Timespan() Function MISCALCULATES Simple dates with missing day/month components.
It seems to overlook leap-days if the Timespan is large (more than a few hundred years)!!

Also the Help for =Timespan() says it 'does not allow for the 10 or 11 days that were deducted from the calendar, owing to the changeover date for the Gregorian calendar' but it does adjust for these days the same as =DayNumber()!!

ID:4783

User avatar
gerrynuk
Megastar
Posts: 565
Joined: 25 Apr 2007 09:21
Family Historian: V6
Location: Welwyn Garden City
Contact:

Date Function Miscalculations

Post by gerrynuk » 13 Sep 2010 15:00

tatewise said:
The =Year(), =DayNumber(), =Timespan() Functions MISCALCULATE Gregorian B.C. years!!
They seem to ignore the A.D. and B.C. selection.
Fortunately not many of us have managed to find ancestors going back that far.

Gerry

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Date Function Miscalculations

Post by tatewise » 13 Sep 2010 22:47

P.S.
Some :XDATETYPE values DISAGREE with the Help documentation.
Estimated and Calculated are swapped around, and several are not capitalised.

Date Type Help Doc :XDATETYPE

(estimated) Estimate calculated
(approx.) Approx approx
(calculated)
not given estimated
from/to Period From/To from/to
to Period To to
Interpreted Phrase Interpreted Phrase interpreted phrase

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Date Function Miscalculations

Post by tatewise » 18 Feb 2011 11:39

The =Timespan(%INDI.BIRT.DATE%,***,YEARS) Function does not always equal the =AgeAt(%INDI%,***) Function for the same set of dates.
This is because =Timespan() simply subtracts the two year components, whereas =AgeAt() also considers the day & month components.
e.g.
%INDI.BIRT.DATE%    =   10 Dec 2000
%INDI.DEAT.DATE%   =   10 Jan 2001
=Timespan(%INDI.BIRT.DATE%,%INDI.DEAT.DATE%,YEARS)  =  1
Whereas  =AgeAt(%INDI%,%INDI.DEAT.DATE%)  correctly   =  0

The =Timespan(***,***,MONTHS) Function MISCALCULATES the elapsed months.
It seems to compute =Timespan(***,***,YEARS) * 12 for the same dates, and then sometimes adds 1.
e.g. (for same dates as above)
=Timespan(%INDI.BIRT.DATE%,%INDI.DEAT.DATE%,MONTHS)  =  13   (yes thirteen!)
Whereas correctly:
=Timespan(%INDI.BIRT.DATE%,%INDI.DEAT.DATE%,DAYS)   =  31

User avatar
SimonOrde
Program Designer
Posts: 352
Joined: 18 Nov 2002 10:20
Family Historian: V7
Location: Calico Pie

Date Function Miscalculations

Post by SimonOrde » 02 Mar 2011 09:49

Thank you for pointing these issues out. They will all be fixed in the next release.

Locked