{"action":"created","issue":{"url":"https://api.github.com/repos/akosma/SwiftMoment/issues/19","labels_url":"https://api.github.com/repos/akosma/SwiftMoment/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/akosma/SwiftMoment/issues/19/comments","events_url":"https://api.github.com/repos/akosma/SwiftMoment/issues/19/events","html_url":"https://github.com/akosma/SwiftMoment/issues/19","id":88214277,"number":19,"title":"Get the NSDate from a moment","user":{"login":"remirobert","id":3276768,"avatar_url":"https://avatars.githubusercontent.com/u/3276768?v=3","gravatar_id":"","url":"https://api.github.com/users/remirobert","html_url":"https://github.com/remirobert","followers_url":"https://api.github.com/users/remirobert/followers","following_url":"https://api.github.com/users/remirobert/following{/other_user}","gists_url":"https://api.github.com/users/remirobert/gists{/gist_id}","starred_url":"https://api.github.com/users/remirobert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remirobert/subscriptions","organizations_url":"https://api.github.com/users/remirobert/orgs","repos_url":"https://api.github.com/users/remirobert/repos","events_url":"https://api.github.com/users/remirobert/events{/privacy}","received_events_url":"https://api.github.com/users/remirobert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-14T16:52:33Z","updated_at":"2015-06-16T17:00:19Z","closed_at":null,"body":"how can i get the NSDate from a moment object ?\r\nIs it posible ?\r\n\r\n```Swift\r\nlet m = moment(endDate.text)\r\n// m.date ??\r\n```"},"comment":{"url":"https://api.github.com/repos/akosma/SwiftMoment/issues/comments/112497382","html_url":"https://github.com/akosma/SwiftMoment/issues/19#issuecomment-112497382","issue_url":"https://api.github.com/repos/akosma/SwiftMoment/issues/19","id":112497382,"user":{"login":"n8armstrong","id":1187499,"avatar_url":"https://avatars.githubusercontent.com/u/1187499?v=3","gravatar_id":"","url":"https://api.github.com/users/n8armstrong","html_url":"https://github.com/n8armstrong","followers_url":"https://api.github.com/users/n8armstrong/followers","following_url":"https://api.github.com/users/n8armstrong/following{/other_user}","gists_url":"https://api.github.com/users/n8armstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/n8armstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n8armstrong/subscriptions","organizations_url":"https://api.github.com/users/n8armstrong/orgs","repos_url":"https://api.github.com/users/n8armstrong/repos","events_url":"https://api.github.com/users/n8armstrong/events{/privacy}","received_events_url":"https://api.github.com/users/n8armstrong/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T17:00:19Z","updated_at":"2015-06-16T17:00:19Z","body":"You can use the `intervalSince` like so:\r\n\r\n```swift\r\nextension Moment {\r\n\r\n  func toNSDate() -> NSDate {\r\n    let epoch = moment(NSDate(timeIntervalSince1970: 0))\r\n    let timeInterval = self.intervalSince(epoch)\r\n    let date = NSDate(timeIntervalSince1970: timeInterval.seconds)\r\n    return date\r\n  }\r\n\r\n}\r\n\r\nlet myMoment: Moment = moment()\r\nlet myDate: NSDate = myMoment.toNSDate()\r\n\r\n```"}}