Date Formatting XCode

Trying to fix date format to be correct for norwegian standards. Now I get: Tuesday, August 2.

Trying to get: Tuesday, 2 August.

Appreciate the help.

      .foregroundColor(.white)
       
      .onAppear {
        datestring =
        Date.now.formatted(.dateTime.weekday(.wide).day().month(.wide))      }

Hi,

   func forNorwegian(_ date: Date?) -> String? {

    let dateFormatter = DateFormatter()
    dateFormatter.dateFormat = "EEEE, d MMMM"
    var output: String? = nil
    if let date = date {
      output = dateFormatter.string(from: date)
    }

    return output
  }
Date Formatting XCode
 
 
Q