Open main menu

Gramps β

Difference between revisions of "Addon:DateCalculator"

m (See also)
m
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Third-party plugin}}
+
{{Third-party addon}}
  
[[File:DateCalculatorGramplet-addon-default-52.png|right|400px|Date Calculator Gramplet - Default opening dialog]]
+
[[File:DateCalculatorGramplet-addon-default-52.png|right|450px|Date Calculator Gramplet - Default opening dialog]]
  
The {{man label|Date Calculator Gramplet}} allows you to do date math.
+
The {{man label|Date Calculator Gramplet}} allows you to do date math to assess estimating dates and ages in genealogical records.
  
Enter at least one valid date for {{man label|Expression 1}} and {{man label|Expression 2}} then click the {{man button|Calculate}} button.
+
Enter at least one valid date for the {{man label|Reference Date or Date Range}} field
  
An expression can be:
 
 
# a valid Gramps date
 
# a valid Gramps date
# a positive or negative number (represents years)
 
# a positive or negative tuple (years, months, days)  {{man label|Note that only a single leading negative sign is needed to indicate a negative tuple.}}
 
  
Note that at least one expression must be a date.
+
and {{man label|Date or offset +/-y or +/-y, m, d}} field which can be:
 +
 
 +
# a date
 +
# a positive or negative number, representing years
 +
# a positive or negative list of values, representing years, months, days  {{man label|Note that only a single leading negative sign is needed to indicate a negative tuple.}}
 +
 
 +
then click the {{man button|Calculate}} button.
 +
 
 +
Note that at least one field must be a date.
  
  
Line 18: Line 23:
 
Select the {{man label|Date Calculator Gramplet}} from the Gramplet menu.
 
Select the {{man label|Date Calculator Gramplet}} from the Gramplet menu.
  
Enter the desired expressions and press the {{man button|Calculate}} to see the result.
+
Enter the desired {{man label|Reference Date or Date Range}} in the first entry field and {{man label|Date or offset +/-y or +/-y, m, d}} in the second entry field  and press the {{man button|Calculate}} to see the calculation in the {{man label|Result}} field.
 +
 
 +
Use the {{man button|Copy}} button to copy the {{man label|Result}} field to the clipboard.
  
 
Use the {{man button|Clear}} button to start again.
 
Use the {{man button|Clear}} button to start again.
 
{{-}}
 
{{-}}
 +
 
==Example usage==
 
==Example usage==
[[File:DateCalculatorGramplet-addon-example-52.png|right|450px|Date Calculator Gramplet - Example results]]
 
 
Assume that a headstone has only a date of death and age at death.  
 
Assume that a headstone has only a date of death and age at death.  
 +
 +
{| class="wikitable" style="width: 100%;"
 +
 
<table><TR><TH colspan="3">RANEY</TH></TR>
 
<table><TR><TH colspan="3">RANEY</TH></TR>
 
<TR><td align=center VALIGN=TOP>
 
<TR><td align=center VALIGN=TOP>
Line 48: Line 58:
 
<small>I will behold thy face<br />in righteousness I shall<br />be satisfied when<br />I awake with thy likeness</small>
 
<small>I will behold thy face<br />in righteousness I shall<br />be satisfied when<br />I awake with thy likeness</small>
 
</td></tr></table>
 
</td></tr></table>
 +
|}
 +
 +
{{-}}
 +
Enter a date in the first field using the following format ( YYYY-MM-DD ).
 +
 +
==={{man label|Reference Date or Date Range}}===
 +
[[File:DateCalculatorGramplet-addon-example-52.png|right|450px|Date Calculator Gramplet - Example results]]
  
Enter a date in each field in the following format ( YYYY-MM-DD ).
 
===Expression 1===
 
 
Enter a starting date or an offset value (such as the date of the most recent birthday on a marriage license):
 
Enter a starting date or an offset value (such as the date of the most recent birthday on a marriage license):
  
for the wife in the example gravestone, enter 14 Nov 1902
+
for the wife in the example gravestone, enter <code>14 Nov 1902</code>
  
===Expression 2===
+
==={{man label|Date or offset +/-y or +/-y, m, d}}===
an offset tuple is in the form y,m,d<br />
+
a positive or negative list of values, representing years, months, days<br />
Example for "Aged 73Yrs. 4Mo. & 3Ds.", use  "- 73, 4, 3"<br />
 
Note that only a single leading negative sign is needed to indicate a negative tuple.
 
===Result===
 
Pressing the {{man button|Calculate}} button returns 1829-07-11. When storing a date that's been calculated from a reference rather than a historical record, it is hard to be certain what methodology was used. So the results are an estimate. Annotate this by preceding the value with "calc abt"
 
  
{{man note|Initially, the Result field will contain the following usage hint:|<pre>Enter an expression in the entries above and click Calculate.
+
Example for "Aged 73Yrs. 4Mo. & 3Ds.", use  "<code>- 73, 4, 3</code>"<br />
  
An expression can be:
+
{{man label|Note that only a single leading negative sign is needed to indicate a negative tuple.}}
  
1. a valid Gramps date
+
==={{man label|Result}}===
2. a positive or negative number, representing years
+
Pressing the {{man button|Calculate}} button returns <code>calculated 1829-07-11</code>. When storing a date that's been calculated from a reference rather than a historical record, it is hard to be certain what methodology was used. So the results are an estimate. Annotate this by preceding the value with "calc abt"
3. a positive or negative tuple, representing (years, months, days)
 
  
Note that at least one expression must be a date.</pre>}}{{-}}
+
{{man note|Initially, the {{man label|Result}} field will contain the following usage hint:|<pre>Enter an expression in the entries above and click Calculate.</pre>}}{{-}}
  
 
==See also==
 
==See also==
* [[Gramps_{{Version manual}}_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_1#Editing_dates|Editing dates]]
+
* [[Gramps_{{man version}}_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_1#Editing_dates|Editing dates]]
* [[Gramps_{{Version manual}}_Wiki_Manual_-_Reports_-_part_2#Formatting_Dates|Formatting Dates]]
+
* [[Gramps_{{man version}}_Wiki_Manual_-_Reports_-_part_2#Formatting_Dates|Formatting Dates]]
 
+
<!-- * https://github.com/gramps-project/addons-source/pull/621 -->
 
[[Category:Addons]]
 
[[Category:Addons]]
 
[[Category:Plugins]]
 
[[Category:Plugins]]
 
[[Category:Gramplets]]
 
[[Category:Gramplets]]
 
[[Category:Developers/General]]
 
[[Category:Developers/General]]

Latest revision as of 06:42, 1 November 2025

Gramps-notes.png
This is a Third-party Addon. The Addon/Plugin system is controlled by the Plugin Manager.

Please use carefully on data that is backed up, and help make it better by reporting any issues to the bug tracker.
Unless otherwise stated on this page, you can download this addon by following these instructions.
Please note that some Addons have prerequisites that need to be installed before they can be used.

Date Calculator Gramplet - Default opening dialog

The Date Calculator Gramplet allows you to do date math to assess estimating dates and ages in genealogical records.

Enter at least one valid date for the Reference Date or Date Range field

  1. a valid Gramps date

and Date or offset +/-y or +/-y, m, d field which can be:

  1. a date
  2. a positive or negative number, representing years
  3. a positive or negative list of values, representing years, months, days Note that only a single leading negative sign is needed to indicate a negative tuple.

then click the Calculate button.

Note that at least one field must be a date.


Contents

Usage

Select the Date Calculator Gramplet from the Gramplet menu.

Enter the desired Reference Date or Date Range in the first entry field and Date or offset +/-y or +/-y, m, d in the second entry field and press the Calculate to see the calculation in the Result field.

Use the Copy button to copy the Result field to the clipboard.

Use the Clear button to start again.

Example usage

Assume that a headstone has only a date of death and age at death.

RANEY

MOTHER
Hannah M.

Wife of
William Raney

Died
Nov. 14, 1902
Aged

73Yrs. 4Mo.
& 3Ds.
Blessed are the dead
who die in the Lord

Source:
Iowa Gravestone
Photo Project

FATHER
William Raney

Died
Oct. 17, 1892
Aged

71 Yrs 2Mo
& 7Ds

I will behold thy face
in righteousness I shall
be satisfied when
I awake with thy likeness


Enter a date in the first field using the following format ( YYYY-MM-DD ).

Reference Date or Date Range

Enter a starting date or an offset value (such as the date of the most recent birthday on a marriage license):

for the wife in the example gravestone, enter 14 Nov 1902

Date or offset +/-y or +/-y, m, d

a positive or negative list of values, representing years, months, days

Example for "Aged 73Yrs. 4Mo. & 3Ds.", use "- 73, 4, 3"

Note that only a single leading negative sign is needed to indicate a negative tuple.

Result

Pressing the Calculate button returns calculated 1829-07-11. When storing a date that's been calculated from a reference rather than a historical record, it is hard to be certain what methodology was used. So the results are an estimate. Annotate this by preceding the value with "calc abt"

 
Initially, the Result field will contain the following usage hint:

Enter an expression in the entries above and click Calculate.


See also