Where should I put the following code in SwiftUI:
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "dd.MM.yyyy"
If I put it outside struct ... {...} I get "Expressions are not allowed at the top level"
If I put it inside I get var body: some View {...} I get Function declares an opaque return type, but has no return statements in its body from which to infer an underlying type.