Difference between revisions of "Addon:DateCalculator"

From Gramps
Jump to: navigation, search
m (See also)
 
(33 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{Third-party plugin}}
 
{{Third-party plugin}}
{{out of date|wip}}
 
  
[[File:Date-calculator-gramplet-default-gramps42.png|right|400px|Date Calculator Gramplet - Default opening dialog]]
+
[[File:DateCalculatorGramplet-addon-default-52.png|right|400px|Date Calculator Gramplet - Default opening dialog]]
  
Date Calculator Gramplet
+
The {{man label|Date Calculator Gramplet}} allows you to do date math.
  
 +
Enter at least one valid date for {{man label|Expression 1}} and {{man label|Expression 2}} then click the {{man button|Calculate}} button.
  
Enter a valid date for {{man label|1}} and {man label|2} then click the {{man button|Calculate button}}.
+
An expression can be:
 +
# 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.
 +
 
 +
 
 +
==Usage==
 +
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.
 +
 
 +
Use the {{man button|Clear}} button to start again.
 
{{-}}
 
{{-}}
 
==Example usage==
 
==Example usage==
[[File:Date-calculator-gramplet-example-result-gramps42.png|right|400px|Date Calculator Gramplet - Example results]]
+
[[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.
 +
<table><TR><TH colspan="3">RANEY</TH></TR>
 +
<TR><td align=center VALIGN=TOP>
 +
<small>MOTHER</small><br />
 +
<b>Hannah M.</b><br />
 +
 
 +
Wife of<BR />
 +
William Raney
 +
 
 +
Died<br />
 +
Nov. 14, 1902<br />
 +
Aged<br />
 +
73Yrs. 4Mo.<br />& 3Ds.<hr width=25 align=center/>
 +
<small>Blessed are the dead<br />who die in the Lord</small></td>
 +
<td align=center>[[file:C051_raney_w_id794872.jpg|right|200px]]<br /><small>Source:</small><br />[https://iowagravestones.org/gs_view.php?id=794874 Iowa Gravestone<br />Photo Project]</td>
 +
<td align=center VALIGN=TOP>
 +
<small>FATHER</small><br /><b>William Raney</b>
 +
 
 +
Died<br />
 +
Oct. 17, 1892<br />
 +
Aged<br />
 +
71 Yrs 2Mo<br />& 7Ds<hr width=25 align=center/>
 +
<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>
 +
 
 +
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):
 +
 
 +
for the wife in the example gravestone, enter 14 Nov 1902
 +
 
 +
===Expression 2===
 +
an offset tuple is in the form y,m,d<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.
 +
 
 +
An expression can be:
 +
 
 +
1. a valid Gramps date
 +
2. a positive or negative number, representing years
 +
3. a positive or negative tuple, representing (years, months, days)
 +
 
 +
Note that at least one expression must be a date.</pre>}}{{-}}
 +
 
 +
==See also==
 +
* [[Gramps_{{Version manual}}_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]]
  
 +
[[Category:Addons]]
 
[[Category:Plugins]]
 
[[Category:Plugins]]
 
[[Category:Gramplets]]
 
[[Category:Gramplets]]
 
[[Category:Developers/General]]
 
[[Category:Developers/General]]

Latest revision as of 20:39, 22 January 2024

Gramps-notes.png

Please use carefully on data that is backed up, and help make it better by reporting any comments or problems to the author, or 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.
This Addon/Plugin system is controlled by the Plugin Manager.


Date Calculator Gramplet - Default opening dialog

The Date Calculator Gramplet allows you to do date math.

Enter at least one valid date for Expression 1 and Expression 2 then click the Calculate button.

An expression can be:

  1. a valid Gramps date
  2. a positive or negative number (represents years)
  3. a positive or negative tuple (years, months, days) 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.


Usage

Select the Date Calculator Gramplet from the Gramplet menu.

Enter the desired expressions and press the Calculate to see the result.

Use the Clear button to start again.

Example usage

Date Calculator Gramplet - Example results

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
C051 raney w id794872.jpg

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 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):

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

Expression 2

an offset tuple is in the form y,m,d
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 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"

Gramps-notes.png
Initially, the Result field will contain the following usage hint:

Enter an expression in the entries above and click Calculate.

An expression can be:

1. a valid Gramps date
2. a positive or negative number, representing years
3. a positive or negative tuple, representing (years, months, days)

Note that at least one expression must be a date.


See also