{"action":"created","issue":{"url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/158","repository_url":"https://api.github.com/repos/iZettle/izettle-toolbox","labels_url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/158/comments","events_url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/158/events","html_url":"https://github.com/iZettle/izettle-toolbox/pull/158","id":133547045,"number":158,"title":"[for discussion] Izettle-java interval","user":{"login":"adamvoncorswant","id":1142587,"avatar_url":"https://avatars.githubusercontent.com/u/1142587?v=3","gravatar_id":"","url":"https://api.github.com/users/adamvoncorswant","html_url":"https://github.com/adamvoncorswant","followers_url":"https://api.github.com/users/adamvoncorswant/followers","following_url":"https://api.github.com/users/adamvoncorswant/following{/other_user}","gists_url":"https://api.github.com/users/adamvoncorswant/gists{/gist_id}","starred_url":"https://api.github.com/users/adamvoncorswant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamvoncorswant/subscriptions","organizations_url":"https://api.github.com/users/adamvoncorswant/orgs","repos_url":"https://api.github.com/users/adamvoncorswant/repos","events_url":"https://api.github.com/users/adamvoncorswant/events{/privacy}","received_events_url":"https://api.github.com/users/adamvoncorswant/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-14T15:15:54Z","updated_at":"2016-02-15T14:37:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/158","html_url":"https://github.com/iZettle/izettle-toolbox/pull/158","diff_url":"https://github.com/iZettle/izettle-toolbox/pull/158.diff","patch_url":"https://github.com/iZettle/izettle-toolbox/pull/158.patch"},"body":"Note: depends on #155 \r\n\r\nUnfortunately, the java8 time API doesn't have a proper interval class.\r\nThe only such classes in standard java is `Duration` and `Period`, but\r\nthey only hold information about the length of time: not the instant on\r\nthe timeline.\r\nSo, a proper interval class should really have been part of the standard\r\n`java.time` API.\r\n\r\nThis class does that. It's a simple class consisting of two `Instant`s.\r\nIt's start inclusive, and end exclusive. Also, it has some utility\r\nmethods, such as `overlap`, `abuts` and `contains`.\r\n\r\nping @nzroller : thoughts on this? I'm thinking of quite a lot of facade methods where we're passing two `Date` objects around..."},"comment":{"url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/comments/184233286","html_url":"https://github.com/iZettle/izettle-toolbox/pull/158#issuecomment-184233286","issue_url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/158","id":184233286,"user":{"login":"adamvoncorswant","id":1142587,"avatar_url":"https://avatars.githubusercontent.com/u/1142587?v=3","gravatar_id":"","url":"https://api.github.com/users/adamvoncorswant","html_url":"https://github.com/adamvoncorswant","followers_url":"https://api.github.com/users/adamvoncorswant/followers","following_url":"https://api.github.com/users/adamvoncorswant/following{/other_user}","gists_url":"https://api.github.com/users/adamvoncorswant/gists{/gist_id}","starred_url":"https://api.github.com/users/adamvoncorswant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamvoncorswant/subscriptions","organizations_url":"https://api.github.com/users/adamvoncorswant/orgs","repos_url":"https://api.github.com/users/adamvoncorswant/repos","events_url":"https://api.github.com/users/adamvoncorswant/events{/privacy}","received_events_url":"https://api.github.com/users/adamvoncorswant/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T14:37:48Z","updated_at":"2016-02-15T14:37:48Z","body":"@chas678 : Regarding your PR-wide questions:\r\nTo me this is the class that we should have used in basically all method signatures where we currently have a `Date from, Date to` (or `Interval from, Interval to` of course). Unfortunately, we haven't done that as of yet, but I want to be able to change the existing signatures.\r\nThe reason to why we don't use joda-time, is because we don't use joda-time in favour of java8 time.  This class is introduced in the toolbox, because we use the toolbox everywhere, and it doesn't introduce any additional dependencies (which is also why we don't want to use guava or three-ten-extra either).\r\n\r\nAlso, I believe that `Interval` will be part of java9, so this is also to prepare for an easy switch when that time comes."}}