title: Sort Arrays based on Month and Year String
body: <p>What is the best way to sort an Array which Contains a month and Year in the following format:</p>
  <pre><code>let dateX2 = Date(); let formatter2 = DateFormatter()
  formatter2.dateFormat = &quot;MMMM,,yyyy&quot;
  let dateZ = formatter2.string(from: dateX2)
  </code></pre>
  <p>Array containing the above formatted dates not in correct order:</p>
  <pre><code>let array = [&quot;July,,2019&quot;, &quot;January,,2020&quot;, &quot;February,,2019&quot;, &quot;March,,2020&quot;]
  </code></pre>
  <p>Expected result following sorting:</p>
  <pre><code>let result = [&quot;February,,2019&quot;, &quot;July,,2019&quot;, &quot;January,,2020&quot;, &quot;March,,2020&quot;]
  </code></pre>