# Event Date sort order variation in 6.0

**URL:** <https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335>\
**Category:** Help\
**Created:** [March 26, 2025, 9:10pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335 "2025-03-26T21:10:29Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![david1](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@david1](https://gramps.discourse.group/u/david1)\
**Post date:** [March 26, 2025, 9:10pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/1 "2025-03-26T21:10:29Z")

</div>

In Gramps AIO64-5.2.4-r1 (Win 11), Event Dates sort correctly like this in Person Events view:

Event [1]: from 1962 to 1988  
Event [2]: 1988  
Event [3]: from 1988 to 1990

However, in AIO64-6.0.0-1, the exact same events incorrectly sort like this in both Person Events view and in the Events Gramplet:

Event [1]: from 1962 to 1988  
Event [3]: from 1988 to 1990  
Event [2]: 1988

Is this a bug or just a setting issue?

---

<div class="post-metadata">

**Author:** ![dsblank](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/dsblank/32/3649_2.png) [@dsblank](https://gramps.discourse.group/u/dsblank)\
**Post date:** [March 28, 2025, 5:38pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/2 "2025-03-28T17:38:33Z")

</div>

I would guess that 1988, and “from 1988 to…” actually tie, and randomly one is first.

---

<div class="post-metadata">

**Author:** ![david1](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@david1](https://gramps.discourse.group/u/david1)\
**Post date:** [March 28, 2025, 5:52pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/3 "2025-03-28T17:52:04Z")

</div>

I don’t think it is random. 6.0 consistently gives the wrong sort order with any similar date sequences. 5.4 always gives the correct sort order.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [March 28, 2025, 5:52pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/4 "2025-03-28T17:52:58Z")

</div>

Does it make sense to add a tie-breaker to the sort? Where Date Quality is the the higher? i.e., exact dates rate higher than approximations?

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [March 28, 2025, 6:43pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/5 "2025-03-28T18:43:11Z")

</div>

Both “1988” and “from 1988 to 1990” have an integer sort value of 2447162. The actual order is probably determined by the order in which they are retrieved from the database.

Maybe we could change the sort value of a range or span to the mid-point? I’m sure that this has been discussed before.

---

<div class="post-metadata">

**Author:** ![Cynwrite](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Cynwrite](https://gramps.discourse.group/u/Cynwrite)\
**Post date:** [March 28, 2025, 7:04pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/6 "2025-03-28T19:04:37Z")

</div>

I would think that if they are using a “regular” date, it should be discrete and sort as @david1’s first example. 1988, and “from 1988 to…” should not tie as the later clearly implies a year beyond 1888.

I don’t think quality should be the deal breaker, it should be the span of time. Just as 1888 comes before May 1888, which comes before 07 May 1888, simply because the less precise the date, the earlier it can start.

* * *

Also, as a complete aside and newbie question, searching Date in the wiki takes me to [Mixed Dates](https://gramps-project.org/wiki/index.php/Mixed_date) which redirects to [Dual Dated](https://gramps-project.org/wiki/index.php/Dates#Dual_Dated) which doesn’t seem to be a valid format anymore and the parent page is a stub, when what I really want is the [6.0 Manual Date Section](https://gramps-project.org/wiki/index.php/Gramps_6.0_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_1#Editing_dates).

Can you only search the Manual? How do we clean results up? Is there “seo” for results? Is there a process or training to be able to edit the wiki? Guidelines, etiquette, etc.?

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [March 28, 2025, 7:54pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/7 "2025-03-28T19:54:45Z")

</div>

> [@Cynwrite](#):
>
> Can you only search the Manual?

The way to search only the manual; AND only 1 version of the manual; AND only 1 language of the manual is:  
download the ofline PDF of the most current version in your language to search.

---

<div class="post-metadata">

**Author:** ![david1](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@david1](https://gramps.discourse.group/u/david1)\
**Post date:** [March 29, 2025, 12:09am UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/8 "2025-03-29T00:09:21Z")

</div>

I think if the integer values are indeed equal, then adding 1 to the integer value of any ranged date would give the correct sort order.

---

<div class="post-metadata">

**Author:** ![dsblank](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/dsblank/32/3649_2.png) [@dsblank](https://gramps.discourse.group/u/dsblank)\
**Post date:** [March 29, 2025, 1:02pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/9 "2025-03-29T13:02:44Z")

</div>

I don’t think we need to sort on a single integer, but could sort on `(start_date_val, span_range_val)` (where `span_range_val` would be 0 for no range) and then all of the dates would sort as expected, shorter spans coming before longer ones.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [March 29, 2025, 1:42pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/10 "2025-03-29T13:42:51Z")

</div>

Should “between 1900 and 1910” sort before or after “1901”? At the moment it sorts before, but it is more likely that the event happens after “1901”.

---

<div class="post-metadata">

**Author:** ![comeng](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@comeng](https://gramps.discourse.group/u/comeng)\
**Post date:** [March 29, 2025, 2:23pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/11 "2025-03-29T14:23:35Z")

</div>

Unless you have made a typo I would say the sort order is correct with  
1901 coming after the start date of 1900.  
phil

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [March 29, 2025, 2:27pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/12 "2025-03-29T14:27:55Z")

</div>

When this was discussed previously, the following order was suggested:

- 1900
- 1901
- between 1900 and 1910

The event “between 1900 and 1910” most likely, but not necessarily, happened after 1901.

---

<div class="post-metadata">

**Author:** ![Cynwrite](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Cynwrite](https://gramps.discourse.group/u/Cynwrite)\
**Post date:** [March 29, 2025, 3:07pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/13 "2025-03-29T15:07:21Z")

</div>

I disagree that it should sort after. Just because there are 10 years, you can’t ascribe random probability to an event like this, and more importantly some events are not chronologically contingent. Yes, you can’t have a death before a marriage, but what if you had a newspaper event and a retirement event. Knowing that the newspaper reported he attended the wedding of a friend in 1901 has no impact on the probability of when his retirement occurred.

Also, what about those that use a range event for recurring events? or use a span event as inclusive?

In this case, we have two concrete facts. It could be as early as 1900 or as late as 1910. I contend that the earliest date should sort accordingly:

- 1900
- between 1900 and 1910
- 1901

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [March 29, 2025, 3:13pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/14 "2025-03-29T15:13:49Z")

</div>

> [@Cynwrite](#):
>
> In this case, we have two concrete facts. It could be as early as 1900 or as late as 1910. I contend that the earliest date should sort accordingly:
> 
> - 1900
> - between 1900 and 1910
> - 1901

This was also one of the opinions in the earlier discussion. We are repeating ourselves here.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [April 28, 2025, 3:14pm UTC](https://gramps.discourse.group/t/event-date-sort-order-variation-in-6-0/7335/15 "2025-04-28T15:14:15Z")

</div>

Closed on April 28, 2025, 3:14pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
