title: Group array of Swift dates by month
body: <p>I have an array of Swift dates:</p>
  <pre><code>[date1, date2, date3, ..., dateN]
  </code></pre>
  <p>I want to group these dates by month:</p>
  <pre><code>[
      [date1, date2],
      [date3],
      ...
      [dateN],
  ]
  </code></pre>
  <p>All days of a month should be inside the same month array.</p>
  <p>How can I group an array of dates by month, either functionally or imperatively?</p>