Helpers to group objects by date + unit tests