Convert date range to span

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Convert date range to span

Gustav Tiger
Hi

I just realized I have been using "between DATE1 and DATE2" instead of "from DATE1 to DATE2" for events, e.g. residential, that span over period of time. From reading some GEDCOM description I now realize this was wrong. Is there a way to mass covert dates to the correct format. Using Gramps 5.0.1 on Linux, sqlite backend.

Regards,
Gustav Tiger
🐅



_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Convert date range to span

Ron Johnson
On 5/2/19 2:16 AM, Gustav Tiger wrote:
Hi

I just realized I have been using "between DATE1 and DATE2" instead of "from DATE1 to DATE2" for events, e.g. residential, that span over period of time. From reading some GEDCOM description I now realize this was wrong. Is there a way to mass covert dates to the correct format. Using Gramps 5.0.1 on Linux, sqlite backend.


If you're comfortable with getting your hands a bit dirty, it should be relatively easy.

Note how FROM and BETWEEN are described in the xml backup file:

  <events>
    <event handle="_e28b931b45d6a3b96d5eb9d2a55" change="1556806927" id="E00000">
      <type>Birth</type>
      <datespan start="2017" stop="2018"/>
      <description>FROM test</description>
    </event>
    <event handle="_e28b935c55016019a9db997d514" change="1556806932" id="E00001">
      <type>Birth</type>
      <daterange start="2017" stop="2018"/>
      <description>BETWEEN test</description>
    </event>
  </events>

So,
1. Take an "exclude media" backup.
2. Decompress the file. For example,
    gunzip -kc ~/gramps_backup/Your_tree.gramps > ~/Your_tree.gramps
4. In your favorite text editor, replace all relevant "daterange" words with "datespan".
5. Create a new tree.
6. Import the modified gramps file into the tree and test whether that worked.

--
Angular momentum makes the world go 'round.


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Convert date range to span

GRAMPS - User mailing list
Automated data conversion is one of the most common ways that data becomes mangled. Don't convert too broadly or blindly

At the very least, the single point-in-time event types that have a 'between' span are likely to more accurately described as a calculated or estimated 'between' span. 

Take Birthdates as an example. It is a valid estimate that a child was born after the estimated puberty of the younger parent and before the lesser of: death of the mother; death of the father + 9 months. Then cannot have been born continuously in the range. So a 'From...To' span should not be overwritten.

-Brian

On Thu, May 2, 2019 at 9:41, Ron Johnson
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org