Calculating date differences is much more difficult that might first appear, because not all months and not all years are the same length.
Ages are often calculated and engraved on gravestones using a simple method that assumes all months have 30 days. This seems to have been the most common method on in the past.
Death: 1899 03 18 --> 1899 02 18+30 --> 1898 14 48 Birth: 1805 04 27 --> 1805 04 27 --> 1805 04 27 Giving an age of 93 years 10 months 21 days
Another method is to borrow the number of days in the month before death and then back the death date up a month. For example,
Death: 1899 03 18 --> 1899 02 18+28 --> 1898 14 46 Birth: 1805 04 27 --> 1805 04 27 --> 1805 04 27 Giving an age of 93 years 10 months 19 days
A third method involves figuring how many days the person was alive in the birth month, and the number of days before death in the death month. That sum is the number of days, and the months between the birth and death month are whole months. But what if the number of days is more than the days in a month?
Death: 1899 03 18 --> 1899 02 --> 1898 13 Birth: 1805 04 27 --> 1805 04 --> 1805 03 Alive from April 27th to 30st in 1805 = 4 days Alive from March 1st to 18th, but don't count last day = 17 days Total of 21 days. Giving an age of 93 years 10 months 21 days
The three different methods will often get different results for the same birth and death dates. In the examples above, the "borrow-from-last-month" method got 19 days, the other two methods got 21 days.
It might seem that if the "perfect" method were used, then you should be able to take any given pair of dates and calculate the age, and then go back and use the birth date and age to calculate the death date, and use the death date and age to calculate the birth date, and all the dates would agree.
Age = Death - Birth Birth = Death - Age Death = Birth + Age
However, this is not actually possible, because months have 28, 29, 30, or 31 days, and years have 365 or 366 days. This is like asking a group of people to measure how many handfuls of blueberries are in a box. Every handful will have a different number of blueberries, and the boxes will not be consistent either. In fact all three methods sometimes give the same age for a given birth date with two different death dates. For example
Method: all months have 30 days | ||
---|---|---|
Birth Date | Death Date | Age |
2 Feb 1999 | 31 Mar 1999 | 1 month 29 days |
. . . | 1 Apr 1999 | 1 month 29 days |
2 Feb 1999 | 31 May 1999 | 3 months 29 days |
. . . | 1 Jun 1999 | 3 months 29 days |
Method: Days alive in birth and death months | ||
Birth Date | Death Date | Age |
2 Feb 1999 | 29 Mar 1999 | 1 month 27 days |
. . . | 1 Apr 1999 | 1 month 27 days |
2 Feb 1999 | 29 Apr 1999 | 2 months 27 days |
. . . | 1 May 1999 | 2 months 27 days |
Adding an age like 1 month 27 days to a birth date of 2 Feb 1999 using the "days alive" method will give only one answer, but there are two possible death dates for that age! Twins could die a day or two apart, and still calculate the same age. Or use the "borrow method, and two people who died the same day could have been born 3 days apart, and still calculate the same age.
Well, in spite of all these issues, people still want to do these kind of calculations, so I have built three calculators in Javascript which you can see below. Each calculator shows the answers for all three methods of calculation.
Please: if you see that I have made a mistake in the Javascript, and you can pinpoint it, contact me and I will try to fix it!