title: Swift convert NSTimeInteval to NSDate
body: <p>I've been following an Objective-C tutorial and the tutor is able to cast an NSTimeInterval object to a NSDate object.</p>
  
  <p>The lesson uses CoreData, and stores the date of a post as an NSTimeInterval, later on we want to retrieve that interval and set it as a formatted date string to present as a section title in a UITableVIewController.</p>
  
  <pre><code>class DiaryEntry: NSManagedObject {
  
  @NSManaged var date: NSTimeInterval
  @NSManaged var body: String
  @NSManaged var imageData: NSData
  @NSManaged var mood: Int16
  @NSManaged var location: String
  
  func sectionName() -&gt; String {
      let date = NSDate().dateByAddingTimeInterval(self.date)
      let f = NSDateFormatter()
      f.dateFormat = "MMM yyy"
  
      return f.stringFromDate(date)
  }
  
  }
  </code></pre>
  
  <p>Mainly concerned with the line:</p>
  
  <pre><code>let date:NSDate = NSDate().dateByAddingTimeInterval(self.date)
  </code></pre>
  
  <p>Which right now is actually adding the set date onto the current date, and this is not the behaviour I want.</p>
  
  <p>How do I cast the <code>self.date</code> variable to an <code>NSDate</code> object in SWIFT?</p>