Hi. I would like to add an if statement to my list that only shows items that are only seven days in the future from the current date, and 30 days in the future. This is how tasks should be sorted. So upcoming tasks in the next 7 days and as an extra list tasks in the next 30 days. But I always get this error ("Operator function '<' requires that 'Date' conform to 'StringProtocol'"), or is there another way to sort the list like this?
List {
Section(header: Text("Test1")){
ForEach(homeLists, id: \.id) { homeList in
if homeList.listdate < Date.now {
NavigationLink {
HomeTabView(homeList: homeList)
} label: {
The content of the list is then written in the label underneath.