Wednesday, 27 May 2015

Measurement Tools

The following tools support conversion of height/weight measurements and the manipulation of dates. They were originally used in Like Father, Like Son in order to convert between metric and imperial units, and to subtract a mixed-unit age from a date. I'm including them on a blog page — somewhat unusually — so that others might benefit from them.

There are similar tools available on the Internet, with both better and worse user interfaces, but this page provides quicker access to them as a group. I might also include extra tools if anyone makes a good suggestion.

Global settings, affecting all tools

Date formatting:
Establish default formatting for dates, and for date ranges. A setting can be made in advance by putting an 'fmtMode' parameter on the associated URL. For instance,

Convert between feet/inches and metres

(Direct link:
feet inches
Converts a height in feet and inches to one in metres, or vice versa.

Convert between stones/pounds and kilograms

(Direct link:
  stones pounds
Converts a weight in stones and pounds to one in kilograms. Also converts kilograms to either stones and pounds, or just pounds. NB: 1 stone = 14 pounds.

Convert between miles/yards and kilometres

(Direct link: tools.html#Distance)
  miles yards
Converts a distance in miles and yards to one in kilometres. Also converts kilometres to either miles and yards, or just yards. NB: 1 mile = 1760 yards.

Count the days between two dates

(Direct link: tools.html#DateSubDate)
Start Date
End Date
  inclusive (adds 1 day)
0 days
Calculates the number of days between the selected dates. The dates may be in either order. NB: Any difference shown involving years takes account of leap years, and is not calculated by simply dividing the day-count by 365. Also, any month count takes account of actual months.

Offset a base date to find a new date

(Direct link: tools.html#DateAddDuration)
Base Date
Resultant Date
Adds or subtracts a duration from a base date to get another date. The duration may include any combination of years, months, weeks, and days. Can also be used to find the day-of-week for a given date by setting the duration to zero.

Calculate range of possible birth dates given an age

(Direct link: tools.html#BirthDateCalc)
Date Recorded
Year multiple of 5
Resultant Range
Calculates the possible birth dates given an age and a date-of-recording. For instance, a census, a death certificate, or a marriage certificate. The age may be provided in years and/or months, but note that a non-zero months value implies greater accuracy. For instance, 12 months is considered more accurate than 1 year. The age is normally at "last birthday", but may be "next birthday", say for the early Canadian census years. The year can also be rounded down to the previous multiple of 5, say for the 1841 census of England and Wales. The 'Remember' button adds the current range to the list held by the Date-Range Overlap analyser.

Analyses the overlap between multiple date ranges

(Direct link: tools.html#DateRanges)
New Range to Add
Effective Date Overlap
Analyses the intersections of a list of separate date ranges and reports the effective overlap (may be multiple if disjoint ranges). For instance, if you have several calculated ranges describing the same birth event then this form will calculate the smaller range over which they all overlap. The 'Remember' button of the Birth Date calculator (above) can also add to the list of ranges. Entries can be ticked as 'ignore' to remove outliers before a re-analysis. The 'Bar Chart' button shows (or hides) a more detailed chart showing the overlap contributions across the whole date range. This may be useful if the ranges actually describe distinct events rather than just one.


  1. Small enhancement made to "Count the days between two dates". As well as showing the separation between two dates in the alternative Y+M format, it also now shows it in Y+M+D format. However, the month count is of actual whole months. For instance, using (19 Aug 2019) and (24 Sep 2022) gives a result of "1223 days (3 yrs 127 dys, or 3 yrs 4 mth 36 dys)". The 36 days arises because there are 12 days left in the Aug month and a new 24 days in the Sep month.

    There are also fixes on Apple hand-devices to make sure all 4 year year digits are accessible, and on all laptops/desktops to prevent the white-space inherited from Blogger appearing around the calendar icons.

  2. Here's some test data to help illustrate the visual output from the 'date-range overlap analyser'. Suppose you have 4 documents that you want to calculate a birthdate from: 2 (England/Wales) census returns, one marriage cert., and one death cert. Go to the birthdate calculator and enter for {census 1881, 3 Apr 1881, age 9}, {census 1891, 5 Apr 1891, age 20}, {marriage, 1 Jul 1892, age 21}, and {death, 3 Jun 1945, age 75}. As you press 'Calculate' for each one, also press 'Remember' which passes a copy of the calculated range to the date-range analyser, just below it. Then go to the date-range analyser, press 'Analyse', and then press 'Bar Chart'. This will use a bar chart to show the overlaps between all these ranges, and it should show two distinct peaks, thus implying that the data was for two distinct people.

  3. Hi Tony,

    Thanks for offering these date tools. I was looking for something like your DateBirthCalc tool. Just what I needed!

    If I may make a suggestion for that tool, a means of changing the format of the resultant range would be handy. Might I suggest adding a drop-down list item to select the display format. I think three formats might be handy: Display (default, the existing format); GEDCOM; and ISO 8601.

    All the best!

  4. Thanks for the suggestion βPer. I need to think about it a bit because there is no current precedent for a global setting.

    P.S. Have you read ?

  5. Hi Tony,

    Thanks for considering my suggestions.

    I had not yet read your write-up on your Date-Range Overlap analyser, but I had read the description of it on this page and made a mental note to use it when trying to figure out the birthdate of one of my ancestors. I had not considered using it to detect when I have information from two or more individuals. That's brilliant! I actually have several cases of ancestors with the same exact name and even ancestors whose nicknames exactly match other ancestors' given names! (e.g.lots of Joe Smiths and a John Smith who goes by the name Joe! (all names fictitious)).

    Regarding my suggested date formats:

    AS I understand it, GEDCOM files are a very common way to exchange genealogical data, and most genealogical software will import and export GEDCOM. I discovered that the program I'm using (open-source Gramps) will effortlessly accept a GEDCOM-format date or date range in its date input fields and perfectly convert it to its internal format. I suspect that other genealogy programs, apps and websites would do the same.

    As for ISO 8601, it's an international standard. I suspect that a some of your users may prefer it, and I would be one. I like ISO 8601 for a couple of reasons. Its numerical form (yyyy-mm-dd) is unambiguous, unlike the American standard (mm/dd/yyyy) and the Canadian government standard (dd/mm/yyyy), and it naturally sorts into chronological order (handy for file names that contain dates). The ISO 8601 date range format is additionally appealing because it's compact and flexible. An example date range using ISO 8601 would be "1869-06-04/1870-06-03" or "1869-06-04--1870-06-03". The latter has the advantage of being acceptable in a file name.

    All the best!

  6. I have several editions of the ISO 8601 standard here but I cannot see "--" being used as an alternative for the "/" separator. For instance, see sec. in the 2994 edition.

    1. OK, I see a vague mention in 4.4.2 (for "in certain application areas"), but this is one of the many "loosey goosey" aspects on the standard that I hate (see

    2. Frankly, I prefer the forward slash anyway.


    3. I have added some alternative date formats βPer. If you look at the forms now then you'll see an extra one, right at the very start, for selecting the default formatting for dates and date-ranges. There's also the option of adding a corresponding fmtMode=n parameter to the URL, where the index is the same as the entries in the format drop-down list (1:6). Let me know if you find any problems.

    4. Thanks! I tried all the formats and they all work like a charm.

      I did hit a possible bug though, related to the fmtMode query. I'll send you a message describing it and make a minor suggestion.


    5. Thanks βPer. There's a contact-me form on the right-hand side of this blog. That'll reach me by email.

    6. I know there was a horrible shortcut in there to implement the get-value-with-default but I just fixed that. :-)

    7. So you did - thanks! Looks like you can disregard a large part of my message.

      For the sake of others that read this, the bug that I reported and Tony fixed related to using the fmtMode parameter and a direct link to a tool in the same URL.


  7. Tony, Thanks for the tools, they are very useful. I am wondering if the tool "Calculate range of possible birth dates given an age" is one day out in its calculations. For example, someone who says they are 72 years on 31 March 1851 could have their birthday on 31 March 1779, and on 31 March 1851 would give their age as 72 years. Yet your tool gives the date range as 31 March 1778 to 30 March 1779. I am thinking the date range should be 1 April 1778 to 31 March 1779. What do you think?

    1. Hmm, that's interesting, Geoff. I agree with your reasoning but I get the correct results here. I therefore need to find out what's different on your system (e.g. your locale, O/S, etc). Can you contact me via the 'Contact Form' (right-hand side of this blog) so that I can get more information?

    2. Still waiting for your reply, Geoff. I see you're in Australia, and that might be significant. As I said, it works fine here (and in the US) and so no changes have yet been made.