{"action":"created","issue":{"url":"https://api.github.com/repos/e-mission/e-mission-server/issues/311","repository_url":"https://api.github.com/repos/e-mission/e-mission-server","labels_url":"https://api.github.com/repos/e-mission/e-mission-server/issues/311/labels{/name}","comments_url":"https://api.github.com/repos/e-mission/e-mission-server/issues/311/comments","events_url":"https://api.github.com/repos/e-mission/e-mission-server/issues/311/events","html_url":"https://github.com/e-mission/e-mission-server/issues/311","id":164766795,"number":311,"title":"Fix local_date rollover queries","user":{"login":"shankari","id":2423263,"avatar_url":"https://avatars.githubusercontent.com/u/2423263?v=3","gravatar_id":"","url":"https://api.github.com/users/shankari","html_url":"https://github.com/shankari","followers_url":"https://api.github.com/users/shankari/followers","following_url":"https://api.github.com/users/shankari/following{/other_user}","gists_url":"https://api.github.com/users/shankari/gists{/gist_id}","starred_url":"https://api.github.com/users/shankari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shankari/subscriptions","organizations_url":"https://api.github.com/users/shankari/orgs","repos_url":"https://api.github.com/users/shankari/repos","events_url":"https://api.github.com/users/shankari/events{/privacy}","received_events_url":"https://api.github.com/users/shankari/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-11T06:11:22Z","updated_at":"2016-07-11T07:55:37Z","closed_at":null,"body":"Back in 6753c223c7084f88c9bebdbc6aa9b9e5a8a6ec7a, we implemented the `Localdate` date data structure and queries on it. The queries allow users to fill in fields of a start and end local dt, and we look for entries that are between the start and the end date.\r\n\r\nThis works well for standard queries \r\ne.g. `2015-08-01T08:18 -> 2015-08-02T08:20`\r\n\r\nbut it does not work well for rollover queries\r\ne.g. `2015-08-01T08:18 -> 2015-08-02T09:08`\r\nbecause when we query for entries where `18 <= minute <= 8`, we don't find any\r\n\r\nOne option is to convert them to ranges instead, but also that the queries support wildcards, which makes converting them to ranges difficult. So for example, all of the following are valid:\r\n\r\n- `2015-08 08:18 -> 2015-09 09:30`: the range from 8:18 to 9:30 on any day in the months of August and September\r\n- `2015 Tuesday -> 2016 Thursday`: Tue, Wed and Thu in 2015 and 2016\r\n\r\nSimilarly, the following rollover queries are also valid and must be supported:\r\n\r\n- `2015-11 22:40 -> 2016-02 06:10`: the range from 10:40pm to 6:10am on any day in the months of November, December, January or February\r\n- `2015 Saturday -> 2016 Monday`: Sat, Sun and Mon in 2015 and 2016\r\n"},"comment":{"url":"https://api.github.com/repos/e-mission/e-mission-server/issues/comments/231665459","html_url":"https://github.com/e-mission/e-mission-server/issues/311#issuecomment-231665459","issue_url":"https://api.github.com/repos/e-mission/e-mission-server/issues/311","id":231665459,"user":{"login":"shankari","id":2423263,"avatar_url":"https://avatars.githubusercontent.com/u/2423263?v=3","gravatar_id":"","url":"https://api.github.com/users/shankari","html_url":"https://github.com/shankari","followers_url":"https://api.github.com/users/shankari/followers","following_url":"https://api.github.com/users/shankari/following{/other_user}","gists_url":"https://api.github.com/users/shankari/gists{/gist_id}","starred_url":"https://api.github.com/users/shankari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shankari/subscriptions","organizations_url":"https://api.github.com/users/shankari/orgs","repos_url":"https://api.github.com/users/shankari/repos","events_url":"https://api.github.com/users/shankari/events{/privacy}","received_events_url":"https://api.github.com/users/shankari/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T07:55:37Z","updated_at":"2016-07-11T07:55:37Z","body":"wrt the previous comment, it is actually unclear whether the middle of the range should be filtered or not.\r\nBasically, if I see something like `2014-02-10 -> 2016-05-15`, it can be interpreted either as a set of filters on the various year(s) or as a range.\r\n\r\nThe notion of treating it as filters instead of a range is particularly attractive/important from the aggregate urban planning perspective so that I can look at changes in particular time slices over longer time frames.\r\n\r\nThe real problem is that we do not have a clear separation between range-based and filter-based queries. Years can only really be range-based, but the other components can be either range-based or filter based as we saw above.\r\n\r\nLet's define that the semantics favor filtering since that makes our life easier.\r\nWe should fix the filtering for rollover as described earlier in this issue.\r\n\r\nLater, we can to a better design that allows flexibility in choosing range or filter queries  \r\n"}}
{"actor":{"display_login":"shankari"}}