How to filter all events with precise dates?

Ok, here are 2 custom filters generated by SuperTool scripts. (And you have to have the SuperTool addon installed because it provides functionality that might be needed for the Custom Filters. Such as custom properties shortcuts that you might have used in the Script.) If you don’t want to install the Custom Filters using the scripts, you can paste the filter definition into the custom_filters.xml file. (As described in “Sharing custom filters”.)

  • SuperTool_IrregularDates - Finds Events with inexact dates
  • SuperTool_RegularDates - Find Events with complete dates - validated with a day, month and year. (No spans or ranges)

In Gramps User Directory’s Gramps51 folder, custom_filters.xml

<?xml version="1.0" encoding="utf-8"?>
<filters>
  <object type="Event">
    <filter name="SuperTool_RegularDates" function="and">
      <rule class="GenericFilterRule_Event" use_regex="False">
        <arg value="dateobject.is_regular()"/>
        <arg value="#  Return &quot;True&quot; if the date is a regular date.&lt;br&gt;#  The regular date is a single exact date, i.e. not text-only, not a range or a span, &lt;br&gt;#    not estimated/calculated, not about/before/after date, and having  a year, &lt;br&gt;#    month, and day all non-zero.&lt;br&gt;# see   https://gramps-project.org/docs/gen/gen_lib.html#gramps.gen.lib.date.Date.is_regular"/>
        <arg value="dateobject=self.event.get_date_object()"/>
      </rule>
    </filter>
    <filter name="SuperTool_IrregularDates" function="and">
      <rule class="GenericFilterRule_Event" use_regex="False">
        <arg value="not (event.get_date_object().is_regular() or event.get_date_object().is_empty())"/>
        <arg value="# Return True if matches events having a irregular date but not a blank date)<br># see https://gramps-project.org/docs/gen/gen_lib.html#gramps.gen.lib.date.Date.is_regular"/>
        <arg value="dateobject=self.event.get_date_object()"/>
      </rule>
    </filter>
    <filter name="SuperTool_Blank_Dates" function="and">
      <rule class="GenericFilterRule_Event" use_regex="False">
        <arg value="event.get_date_object().is_empty()"/>
        <arg value="#  Return &quot;True&quot; if the date is a blank date."/>
        <arg value="dateobject=self.event.get_date_object()"/>
      </rule>
    </filter>
  </object>
</filters>

Or… if you’re up to trying to see how these were built, here’s the initial script where you can “File → Open” and “File → Save as filter” when in SuperTool with the Events category active. This creates the 1st Custom Filter in the Events category using the text in the Title field:

[Gramps SuperTool_beta script file]
version=1
[title]
SuperTool_IrregularDates
[category]
Events
[initial_statements]
#  Return "True" if the date is a regular date.
#  The regular date is a single exact date, i.e. not text-only, not a range or a span, not estimated/calculated, 
#    not about/before/after date, and having year, month, and day all non-zero.
# see   https://gramps-project.org/docs/gen/gen_lib.html?highlight=is_regular#gramps.gen.lib.date.Date.is_regular
[statements]
dateobject=self.event.get_date_object()
[filter]
not dateobject.is_regular()
[expressions]
type, date, placename, participants, dateobject.is_regular(), description
[scope]
selected
[unwind_lists]
False
[commit_changes]
False
[summary_only]
False

To create the 2nd Custom Filter, just change the name in the Title (from Irregular to Regular) and eliminate the "not " at the beginning of the Filter field. Then Save as filter again.