{"action":"closed","issue":{"url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/253","repository_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus","labels_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/253/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/253/comments","events_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/253/events","html_url":"https://github.com/cloudfoundry-incubator/cf-abacus/issues/253","id":135940180,"number":253,"title":"Time window bounds intersect with the bounds of adjacent time windows","user":{"login":"BetaFood","id":10606422,"avatar_url":"https://avatars.githubusercontent.com/u/10606422?v=3","gravatar_id":"","url":"https://api.github.com/users/BetaFood","html_url":"https://github.com/BetaFood","followers_url":"https://api.github.com/users/BetaFood/followers","following_url":"https://api.github.com/users/BetaFood/following{/other_user}","gists_url":"https://api.github.com/users/BetaFood/gists{/gist_id}","starred_url":"https://api.github.com/users/BetaFood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BetaFood/subscriptions","organizations_url":"https://api.github.com/users/BetaFood/orgs","repos_url":"https://api.github.com/users/BetaFood/repos","events_url":"https://api.github.com/users/BetaFood/events{/privacy}","received_events_url":"https://api.github.com/users/BetaFood/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/labels/Discussion","name":"Discussion","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-24T03:11:20Z","updated_at":"2016-02-25T21:51:20Z","closed_at":"2016-02-25T21:51:20Z","body":"Using 2016-01-01T00:00:00.000Z as an example.\r\n\r\nIf we want to get the bounds of January 1st for the date scale, it would return:\r\n```json\r\n{\r\n  \"from\": \"2016-01-01T00:00:00.000Z\",\r\n  \"to\": \"2016-01-02T00:00:00.000Z\"\r\n}\r\n```\r\n\r\nthe bounds for December 31st for the date scale is as follows:\r\n```json\r\n{\r\n  \"from\": \"2015-12-31T00:00:00.000Z\",\r\n  \"to\": \"2016-01-01T00:00:00.000Z\"\r\n}\r\n```\r\n\r\nWith a date of 2016-01-01T00:00:00.000Z, it would fall within the bounds of January 1st first, but it would also fall within the bounds of December first assuming a condition like\r\n```javascript\r\nif( time < from || time > to)\r\n  return null\r\n```\r\n\r\nI'm wondering if the time window bounds calculation should return the end of the current day rather than the beginning of the last day for the to time.\r\nie: Return\r\n```\r\n\"2016-01-01T23:59:59.999Z\"\r\n```\r\nrather than\r\n```\r\n\"2016-01-02T00:00:00.000Z\"\r\n```\r\n\r\nOr should we leave it as is."}}