Backend: Sorting of activity- and timeperiodlists