title: Differences in NSDateComponents syntax?
body: <p>I have been working on a clock app in Swift and with Xcode 6.3.2 the following code builds and runs just fine.</p>
  
  <pre><code>// Get current time
  let date = NSDate()
  let calendar = NSCalendar.currentCalendar()
  let components = calendar.components(.CalendarUnitHour | .CalendarUnitMinute | .CalendarUnitSecond | .CalendarUnitNanosecond, fromDate: date)
  let hour = components.hour % 12
  let minute = components.minute
  let second = components.second
  let nanosecond = components.nanosecond
  </code></pre>
  
  <p>However when I load the same project up in Xcode 7.0 beta and make no changes whatsoever, I get an error on the calendar.components line.</p>
  
  <pre><code>Could not find member 'CalendarUnitHour'
  </code></pre>
  
  <p>I've looked at the documentation and all of the NSCalendarUnit constants are deprecated (in iOS 8.0 it says) but the method description for the components method still says to use them.</p>
  
  <p>I've played around with other NSCalendarUnit auto-complete values but none produce working code and I can't find any recent examples online, perhaps because this is brand new.</p>
  
  <p>Anyone know the new correct way to do this?</p>