title: Swift 3 Date Extension: Getting 'daysFrom' a date
body: <p>In my old code I had a Date extension called "daysFrom" and I can't seem to migrate to Swift 3:</p>
  
  <pre><code>func daysFrom(_ date:Date) -&gt; Int{
      //Swift 2: 
      //return Calendar.current.date(.firstWeekday, from: date, to: self, options: []).day
  
      //My Swift 3 attempt, doesn't work:
      return Calendar.current.date([.firstWeekday], from: date, to: self).day
  }
  </code></pre>
  
  <p>I found <a href="https://stackoverflow.com/questions/38920909/xcode-8-and-swift-3-nscalendar">this</a> Swift thread which says: </p>
  
  <blockquote>
    <p>...neither NSCalendarUnit in Swift 2 nor Calendar.Component in Swift 3 contain the components firstWeekday...</p>
  </blockquote>
  
  <p>So how do I replace this extension??</p>