fdo#72774: Generate correct group items for the year group.

This changes bring it back to the same algorithm used in 3.5.

Change-Id: I16855cef1de133a1f886baa823d5b0d2b148e781
(cherry picked from commit c2e88a32314012afb799e321ec1d658f99f71781)
Reviewed-on: https://gerrit.libreoffice.org/7306
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>