Match dates

From Gramps
Jump to: navigation, search

Explanation of the date matching logic in Gramps

Where used?

Some filters allow you to search on dates, eg the Person Filter sidebar allows you to filter on the birth date of a person.

The date entered is matched with the date in the birth event of the person, and if it matches you see the result.

How does date matching work

If the date is textual, the text of the date as entered is matched with the textual date.

e.g., a birth date of 'happy 2001', will be matched if you search on '2001' or 'py 2001'

If the date is a correct date, the dates are compared. If part of the date corresponds with part of the date you want to match with, the match is considered successful.

Matching is as follows:

  • both dates are transformed to the Gregorian calendar
  • The range of a date is determined
    • 2001-12-12: one day
    • 2001-12 : an entire month
    • 2001 : an entire year
    • before 2001: from 2001-9999 to 2000-12-31
    • after 2001 : from 2002-1-1 to 2002+9999
    • about 2001 : between 2001-10=1991 to 2001+10=2011 (same for abt, around, circa)
    • estimated 2001: between 2001-10=1991 to 2001+10=2011
    • calculated 2001: no influence, considered as 2001

Special cases:

  • mixed date: e.g. 1735/6-12-12, as the meaning of this is 1736-12-12 in Gregorian calendar, 1736-12-12 is used with the above mentioned rules.

Changing after/before/about range


That you can only change the ~/.gramps/keys.ini file if Gramps is not running.

The date ranges taken by Gramps are set by keys. These keys can be added to your ~/.gramps/keys.ini file. Eg, you could add to the behavior group:


These are the default values. If you want to have that before only reaches back 100 years on matches, give instead:


See also