title: How to add or minus 1 month from current date?
body: <p>I need to be able to add or minus 1 month from the current date.</p>
  
  <p>So far I have this code:</p>
  
  <pre><code>import SwiftUI
  
  struct DateView: View {
      static let dateFormat: DateFormatter = {
          let formatter = DateFormatter()
          formatter.setLocalizedDateFormatFromTemplate("yyyy MMMM")
          return formatter
      }()
  
      var date = Date()
  
      var body: some View {
  
          HStack {
  
              Button(action: {
                  print("Button Pushed")
              }) {
                  Image(systemName: "chevron.left")
                  .padding()
              }
  
              Spacer()
  
              Text("\(date, formatter: Self.dateFormat)")
              Spacer()
  
              Button(action: {
                  print("Button Pushed")
              }) {
                  Image(systemName: "chevron.right")
                  .padding()
              }
  
          }
          .padding()
          .background(Color.yellow)
      }
  }
  
  struct DateView_Previews: PreviewProvider {
      static var previews: some View {
          DateView()
      }
  }
  </code></pre>
  
  <p>I would like to change the date displayed to be +1 month or -1 month depending on which chevron I will tap.</p>
  
  <p>I am new to swift and swiftui and don't know what action I should use. I think it's related to DateComponents, but what should I do about it now? I am stuck. Please help me.</p>
  
  <p>To better visualise what I have and want to do, here is an image of my current result:</p>
  
  <p><img src="https://i.stack.imgur.com/bTq88.png" alt="enter image description here"></p>