I have a view that has the days of the week, which should increment when the user toggles the arrows (increment either to the next or prev day).

I first grab the current day of the week and format to a String. Then save to my var currentWeekday:

```swift
class GrabCurrentDate: ObservableObject {
    @Published var currentWeekday = Date().dayNumberOfWeek()!

    func currentDate() {
        let date = Date()
        let formatter = DateFormatter()
        formatter.timeStyle = .short
        let dateString = formatter.string(from: Date())
        //set day of week
        currentWeekday = Date().dayNumberOfWeek()!
    }
}

```

Then I dump the days of the week in a switch statement, assigning the days to display in the view as a string:

```swift
extension Date {
    func dayNumberOfWeek() -> Int? {
        return Calendar.current.dateComponents([.weekday], from: self).weekday! - 1
    }
}

func weekdayAsString(date: Int) -> String {
    switch Date().dayNumberOfWeek() {
        case 0:

            return "Sunday"

        case 1:
            return "Monday"

        case 2:
            return "Tuesday"

        case 3:
            return "Wednesday"

        case 4:
            return "Thursday"

        case 5:
            return "Friday"

        case 6:
            return "Saturday"

        default:
            return ""
    }
}

```

Lastly my view:

```swift
struct testView: View {
    @ObservedObject var currentDate = GrabCurrentDate()

    func weekdayAsString(date: Int) -> String {
        // Defined in the code above
    }

    var body: some View {
        HStack {
            Image(systemName: "arrow.left")
                .onTapGesture{
                    currentDate.currentWeekday -= 1
                    print(currentDate.currentWeekday )
                }
            Text(weekdayAsString(date: currentDate.currentWeekday)) // << display current day of week

            Image(systemName: "arrow.right")
                .onTapGesture{
                    currentDate.currentWeekday += 1
                }
        }
    }
}

```

When I go to increment, the published var updates correctly but the view does not. Thanks in advance for the help.