* Marriage length

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
avatar
Forpm
Gold
Posts: 28
Joined: 17 Nov 2008 18:53
Family Historian: V5

Marriage length

Post by Forpm » 12 Jan 2013 08:50

Someone has asked me if their parents' 70th wedding anniversary represents a record anniversary within our family.

Is there a query available to show the length of a marriage (i.e. from marriage date to divorce or death of one partner)?

ID:6694

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Marriage length

Post by Jane » 12 Jan 2013 11:32

I could not think of a quick way in a query, but I have done a quick plugin.

You'll need to 'sanity' check results where there the life dates are not complete for the partners.

https://www.dropbox.com/s/r7u0id5o8saaz ... ort.fh_lua

avatar
Forpm
Gold
Posts: 28
Joined: 17 Nov 2008 18:53
Family Historian: V5

Marriage length

Post by Forpm » 12 Jan 2013 12:37

Many thanks. Much appreciated.

It almost works except for when there is a death date for the wife but no death date for the husband, when it then seems to use today's date to calculate the marriage length.

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Marriage length

Post by Jane » 13 Jan 2013 18:57

I'll see if I can fix it, might be a day or so as I am a bit busy with other things at the moment.

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Marriage length

Post by johnmorrisoniom » 13 Jan 2013 19:06

I didn't get any like that, but those without dates had an lifespan of about 90 assumed.
I also had a few negative results, but a bit of extra research sorted them out.

avatar
TimTreeby
Famous
Posts: 168
Joined: 12 Sep 2003 14:56
Family Historian: V6.2
Location: Ogwell, Devon
Contact:

Marriage length

Post by TimTreeby » 13 Jan 2013 21:11

There are actually two problems with this plugin, one is easy to fix the other needs a bit more thinking about.

The problem as reported by forpm is down to if Husband Estimated Death Date is a future date then a Null is returned which throws the calculations out. Can prove this by just checking option to estimate future death dates.

See example

Image

Wrong Marriage Length
Image

Correct Marriage Length
Image

The other fix is slightly easier and justs needs variable in EstimatedDeathDate changed from MID to LATEST. See example

Image

Wrong Marriage Length
Image

Correct Marriage Length
Image

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Marriage length

Post by Jane » 14 Jan 2013 09:18

I have fixed the Null problem on the Estimated dates, and changed it over to LATEST, the same link should work.

I wondered about skipping people with missing dates, but could not decide where to draw the line as for example my own marriage has both partners living so would be skipped from the report if I omit records where both have no death dates.

avatar
Forpm
Gold
Posts: 28
Joined: 17 Nov 2008 18:53
Family Historian: V5

Marriage length

Post by Forpm » 14 Jan 2013 09:52

Thanks for all this and to Jane for writing the plugin.

I think there is still a problem, now in reverse to the one I posted earlier.

If there is a death date for the husband, but not for the wife, then the marriage length is calculated using today's year.

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Marriage length

Post by Jane » 14 Jan 2013 12:45

I have given it another go any better?

avatar
TimTreeby
Famous
Posts: 168
Joined: 12 Sep 2003 14:56
Family Historian: V6.2
Location: Ogwell, Devon
Contact:

Marriage length

Post by TimTreeby » 14 Jan 2013 13:00

Seems to be fine now for me.

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Marriage length

Post by johnmorrisoniom » 14 Jan 2013 17:00

I got no change in results between 0.2 & 0.3 , but I was happy anyway.
0.3 now correctly shows that it is running in the plugin window, 0.1 & 0.2 did not.
An excellent tool for highlighting incomplete data. I will be using it daily (ish)

avatar
Forpm
Gold
Posts: 28
Joined: 17 Nov 2008 18:53
Family Historian: V5

Marriage length

Post by Forpm » 14 Jan 2013 17:18

Jane - that is perfect now. Thanks so much for your help.

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Marriage length

Post by Jane » 16 Jan 2013 10:49

This has now been added to the plugin store, it has a couple of extra columns and allows the selection of all or selected records.

Post Reply