There are several apps which show a list with sections like "Today", "Yesterday" and so on like Inbox Android app
I wrote few top-level functions which are helpful to check if the date is upcoming, tomorrow, today, yesterday, this month, this week or older to show sections in my app
PS: I used SectionedRecyclerView library to show sections in my app.
Dependency: