title: Xcode 11, swift. Dateformatter always return nil
body: <p>I have a problem with converting value from <code>String</code> to <code>Date</code> in Swift. </p>
  
  <p>It always returns nil. What am I doing wrong?</p>
  
  <pre><code>let dateFormatter = DateFormatter()
  dateFormatter.dateFormat = "yyyy-MM-dd"
  let date = dateFormatter.date(from: "2019-05-03")
  </code></pre>
  
  <p>Here is what is happening in the debugger in Xcode </p>
  
  <p><img src="https://i.stack.imgur.com/dvdJB.png" alt="enter image description here"></p>