{"action":"created","issue":{"url":"https://api.github.com/repos/naoty/Timepiece/issues/9","labels_url":"https://api.github.com/repos/naoty/Timepiece/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/naoty/Timepiece/issues/9/comments","events_url":"https://api.github.com/repos/naoty/Timepiece/issues/9/events","html_url":"https://github.com/naoty/Timepiece/pull/9","id":75159182,"number":9,"title":"Feature/compare duration","user":{"login":"mattijsf","id":706368,"avatar_url":"https://avatars.githubusercontent.com/u/706368?v=3","gravatar_id":"","url":"https://api.github.com/users/mattijsf","html_url":"https://github.com/mattijsf","followers_url":"https://api.github.com/users/mattijsf/followers","following_url":"https://api.github.com/users/mattijsf/following{/other_user}","gists_url":"https://api.github.com/users/mattijsf/gists{/gist_id}","starred_url":"https://api.github.com/users/mattijsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattijsf/subscriptions","organizations_url":"https://api.github.com/users/mattijsf/orgs","repos_url":"https://api.github.com/users/mattijsf/repos","events_url":"https://api.github.com/users/mattijsf/events{/privacy}","received_events_url":"https://api.github.com/users/mattijsf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-11T09:50:31Z","updated_at":"2015-05-11T17:55:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/naoty/Timepiece/pulls/9","html_url":"https://github.com/naoty/Timepiece/pull/9","diff_url":"https://github.com/naoty/Timepiece/pull/9.diff","patch_url":"https://github.com/naoty/Timepiece/pull/9.patch"},"body":"- Added support to subtract two dates from each other and obtain the difference as NSTimeInterval.\r\n- Added ability to compare Duration against NSTimeInterval\r\n\r\nThese two additations combined allows the following:\r\n```swift\r\nif date2 - date1 > 5.seconds { ... }\r\netc.\r\n```"},"comment":{"url":"https://api.github.com/repos/naoty/Timepiece/issues/comments/100998412","html_url":"https://github.com/naoty/Timepiece/pull/9#issuecomment-100998412","issue_url":"https://api.github.com/repos/naoty/Timepiece/issues/9","id":100998412,"user":{"login":"mattijsf","id":706368,"avatar_url":"https://avatars.githubusercontent.com/u/706368?v=3","gravatar_id":"","url":"https://api.github.com/users/mattijsf","html_url":"https://github.com/mattijsf","followers_url":"https://api.github.com/users/mattijsf/followers","following_url":"https://api.github.com/users/mattijsf/following{/other_user}","gists_url":"https://api.github.com/users/mattijsf/gists{/gist_id}","starred_url":"https://api.github.com/users/mattijsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattijsf/subscriptions","organizations_url":"https://api.github.com/users/mattijsf/orgs","repos_url":"https://api.github.com/users/mattijsf/repos","events_url":"https://api.github.com/users/mattijsf/events{/privacy}","received_events_url":"https://api.github.com/users/mattijsf/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T17:55:36Z","updated_at":"2015-05-11T17:55:36Z","body":"I fully agree there! I was also in doubt wether or not to go for such an approach. I did in the end chose for the most theoratically \"correct\" approach. But it does make sense to go for 30 days / 365.25 days if you indeed follow the principle of least astonishment. In reality I expect the usage of month / year will be limited anyhow. It makes pratically more sense to compare against x.day or x.seconds.\r\n\r\nI'll change that then!"}}