title: How to group Arrays by Date in Swift?
body: <p>I have a model which contains a <code>date</code> property. </p>
  
  <p>I can group the dates by <code>Dictionary(grouping..</code> </p>
  
  <pre><code>let grouped = Dictionary(grouping: orders.results, by: { $0.createdAt })
  </code></pre>
  
  <p>But the issue is when doing decoding I did this: </p>
  
  <pre><code>let dateFormatter = DateFormatter()
  dateFormatter.locale = Locale(identifier: "en_US_POSIX")
  dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
  </code></pre>
  
  <p>So my <code>Date</code> property accounts for time as well. </p>
  
  <p>How should I go about grouping by just <code>yyyy-MM-dd</code>?</p>