{"action":"created","comment":{"url":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls/comments/32926606","id":32926606,"diff_hunk":"@@ -215,13 +225,42 @@ def root(self):\n \n     def collection_querystring(self):\n         return make_query(self.options)\n-        return urllib.urlencode(self.options)\n+\n+    def _fix_range_criteria(self, index):\n+        \"\"\"\n+        Calendar commonly preset criteria like these:\n+            'start': {'query': last_date, 'range': 'max'}\n+            'end': {'query': first_date, 'range': 'min'}\n+        We must take care of collections that already use start or end criteria and be\n+        sure that we don't allow dates outside the current month\n+        \"\"\"\n+        year = self.year\n+        month = self.month\n+        criteria = self.options[index]\n+        if IDateTime.providedBy(criteria['query']):\n+            criteria['query'] = [criteria['query']]\n+        criteria['query'] = [d for d in criteria['query'] if d.year()==year and d.month()==month]\n+\n+        if index=='start':","path":"collective/portlet/calendar/calendar.py","position":54,"original_position":54,"commit_id":"0d1a1db6135e513dae99a3da41384cacd473b197","original_commit_id":"0d1a1db6135e513dae99a3da41384cacd473b197","user":{"login":"rodfersou","id":131209,"avatar_url":"https://avatars.githubusercontent.com/u/131209?v=3","gravatar_id":"","url":"https://api.github.com/users/rodfersou","html_url":"https://github.com/rodfersou","followers_url":"https://api.github.com/users/rodfersou/followers","following_url":"https://api.github.com/users/rodfersou/following{/other_user}","gists_url":"https://api.github.com/users/rodfersou/gists{/gist_id}","starred_url":"https://api.github.com/users/rodfersou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodfersou/subscriptions","organizations_url":"https://api.github.com/users/rodfersou/orgs","repos_url":"https://api.github.com/users/rodfersou/repos","events_url":"https://api.github.com/users/rodfersou/events{/privacy}","received_events_url":"https://api.github.com/users/rodfersou/received_events","type":"User","site_admin":false},"body":"Please add spaces between operator","created_at":"2015-06-22T11:56:18Z","updated_at":"2015-06-22T11:56:18Z","html_url":"https://github.com/collective/collective.portlet.calendar/pull/6#discussion_r32926606","pull_request_url":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls/comments/32926606"},"html":{"href":"https://github.com/collective/collective.portlet.calendar/pull/6#discussion_r32926606"},"pull_request":{"href":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls/6","id":37916346,"html_url":"https://github.com/collective/collective.portlet.calendar/pull/6","diff_url":"https://github.com/collective/collective.portlet.calendar/pull/6.diff","patch_url":"https://github.com/collective/collective.portlet.calendar/pull/6.patch","issue_url":"https://api.github.com/repos/collective/collective.portlet.calendar/issues/6","number":6,"state":"open","locked":false,"title":"Multiple fixes","user":{"login":"keul","id":284924,"avatar_url":"https://avatars.githubusercontent.com/u/284924?v=3","gravatar_id":"","url":"https://api.github.com/users/keul","html_url":"https://github.com/keul","followers_url":"https://api.github.com/users/keul/followers","following_url":"https://api.github.com/users/keul/following{/other_user}","gists_url":"https://api.github.com/users/keul/gists{/gist_id}","starred_url":"https://api.github.com/users/keul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keul/subscriptions","organizations_url":"https://api.github.com/users/keul/orgs","repos_url":"https://api.github.com/users/keul/repos","events_url":"https://api.github.com/users/keul/events{/privacy}","received_events_url":"https://api.github.com/users/keul/received_events","type":"User","site_admin":false},"body":"See CHANGES.rst to see the complete list of changes.","created_at":"2015-06-17T15:52:18Z","updated_at":"2015-06-22T11:56:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af28fbfcb9a854875519de82c520ce642378e094","assignee":{"login":"rodfersou","id":131209,"avatar_url":"https://avatars.githubusercontent.com/u/131209?v=3","gravatar_id":"","url":"https://api.github.com/users/rodfersou","html_url":"https://github.com/rodfersou","followers_url":"https://api.github.com/users/rodfersou/followers","following_url":"https://api.github.com/users/rodfersou/following{/other_user}","gists_url":"https://api.github.com/users/rodfersou/gists{/gist_id}","starred_url":"https://api.github.com/users/rodfersou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodfersou/subscriptions","organizations_url":"https://api.github.com/users/rodfersou/orgs","repos_url":"https://api.github.com/users/rodfersou/repos","events_url":"https://api.github.com/users/rodfersou/events{/privacy}","received_events_url":"https://api.github.com/users/rodfersou/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls/6/commits","review_comments_url":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls/6/comments","review_comment_url":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/collective/collective.portlet.calendar/issues/6/comments","statuses_url":"https://api.github.com/repos/collective/collective.portlet.calendar/statuses/0d1a1db6135e513dae99a3da41384cacd473b197","head":{"label":"collective:rer-fixes","ref":"rer-fixes","sha":"0d1a1db6135e513dae99a3da41384cacd473b197","user":{"login":"collective","id":362867,"avatar_url":"https://avatars.githubusercontent.com/u/362867?v=3","gravatar_id":"","url":"https://api.github.com/users/collective","html_url":"https://github.com/collective","followers_url":"https://api.github.com/users/collective/followers","following_url":"https://api.github.com/users/collective/following{/other_user}","gists_url":"https://api.github.com/users/collective/gists{/gist_id}","starred_url":"https://api.github.com/users/collective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collective/subscriptions","organizations_url":"https://api.github.com/users/collective/orgs","repos_url":"https://api.github.com/users/collective/repos","events_url":"https://api.github.com/users/collective/events{/privacy}","received_events_url":"https://api.github.com/users/collective/received_events","type":"Organization","site_admin":false},"repo":{"id":3410313,"name":"collective.portlet.calendar","full_name":"collective/collective.portlet.calendar","owner":{"login":"collective","id":362867,"avatar_url":"https://avatars.githubusercontent.com/u/362867?v=3","gravatar_id":"","url":"https://api.github.com/users/collective","html_url":"https://github.com/collective","followers_url":"https://api.github.com/users/collective/followers","following_url":"https://api.github.com/users/collective/following{/other_user}","gists_url":"https://api.github.com/users/collective/gists{/gist_id}","starred_url":"https://api.github.com/users/collective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collective/subscriptions","organizations_url":"https://api.github.com/users/collective/orgs","repos_url":"https://api.github.com/users/collective/repos","events_url":"https://api.github.com/users/collective/events{/privacy}","received_events_url":"https://api.github.com/users/collective/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/collective/collective.portlet.calendar","description":"This package provides a configurable implementation of a Calendar Portlet.","fork":false,"url":"https://api.github.com/repos/collective/collective.portlet.calendar","forks_url":"https://api.github.com/repos/collective/collective.portlet.calendar/forks","keys_url":"https://api.github.com/repos/collective/collective.portlet.calendar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/collective/collective.portlet.calendar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/collective/collective.portlet.calendar/teams","hooks_url":"https://api.github.com/repos/collective/collective.portlet.calendar/hooks","issue_events_url":"https://api.github.com/repos/collective/collective.portlet.calendar/issues/events{/number}","events_url":"https://api.github.com/repos/collective/collective.portlet.calendar/events","assignees_url":"https://api.github.com/repos/collective/collective.portlet.calendar/assignees{/user}","branches_url":"https://api.github.com/repos/collective/collective.portlet.calendar/branches{/branch}","tags_url":"https://api.github.com/repos/collective/collective.portlet.calendar/tags","blobs_url":"https://api.github.com/repos/collective/collective.portlet.calendar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/collective/collective.portlet.calendar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/collective/collective.portlet.calendar/git/refs{/sha}","trees_url":"https://api.github.com/repos/collective/collective.portlet.calendar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/collective/collective.portlet.calendar/statuses/{sha}","languages_url":"https://api.github.com/repos/collective/collective.portlet.calendar/languages","stargazers_url":"https://api.github.com/repos/collective/collective.portlet.calendar/stargazers","contributors_url":"https://api.github.com/repos/collective/collective.portlet.calendar/contributors","subscribers_url":"https://api.github.com/repos/collective/collective.portlet.calendar/subscribers","subscription_url":"https://api.github.com/repos/collective/collective.portlet.calendar/subscription","commits_url":"https://api.github.com/repos/collective/collective.portlet.calendar/commits{/sha}","git_commits_url":"https://api.github.com/repos/collective/collective.portlet.calendar/git/commits{/sha}","comments_url":"https://api.github.com/repos/collective/collective.portlet.calendar/comments{/number}","issue_comment_url":"https://api.github.com/repos/collective/collective.portlet.calendar/issues/comments{/number}","contents_url":"https://api.github.com/repos/collective/collective.portlet.calendar/contents/{+path}","compare_url":"https://api.github.com/repos/collective/collective.portlet.calendar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/collective/collective.portlet.calendar/merges","archive_url":"https://api.github.com/repos/collective/collective.portlet.calendar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/collective/collective.portlet.calendar/downloads","issues_url":"https://api.github.com/repos/collective/collective.portlet.calendar/issues{/number}","pulls_url":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls{/number}","milestones_url":"https://api.github.com/repos/collective/collective.portlet.calendar/milestones{/number}","notifications_url":"https://api.github.com/repos/collective/collective.portlet.calendar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/collective/collective.portlet.calendar/labels{/name}","releases_url":"https://api.github.com/repos/collective/collective.portlet.calendar/releases{/id}","created_at":"2012-02-10T19:30:04Z","updated_at":"2014-11-26T18:56:56Z","pushed_at":"2015-06-17T15:52:19Z","git_url":"git://github.com/collective/collective.portlet.calendar.git","ssh_url":"git@github.com:collective/collective.portlet.calendar.git","clone_url":"https://github.com/collective/collective.portlet.calendar.git","svn_url":"https://github.com/collective/collective.portlet.calendar","homepage":"","size":390,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"collective:master","ref":"master","sha":"085cde16dc2bce44bcec74803cc5f860c8927c51","user":{"login":"collective","id":362867,"avatar_url":"https://avatars.githubusercontent.com/u/362867?v=3","gravatar_id":"","url":"https://api.github.com/users/collective","html_url":"https://github.com/collective","followers_url":"https://api.github.com/users/collective/followers","following_url":"https://api.github.com/users/collective/following{/other_user}","gists_url":"https://api.github.com/users/collective/gists{/gist_id}","starred_url":"https://api.github.com/users/collective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collective/subscriptions","organizations_url":"https://api.github.com/users/collective/orgs","repos_url":"https://api.github.com/users/collective/repos","events_url":"https://api.github.com/users/collective/events{/privacy}","received_events_url":"https://api.github.com/users/collective/received_events","type":"Organization","site_admin":false},"repo":{"id":3410313,"name":"collective.portlet.calendar","full_name":"collective/collective.portlet.calendar","owner":{"login":"collective","id":362867,"avatar_url":"https://avatars.githubusercontent.com/u/362867?v=3","gravatar_id":"","url":"https://api.github.com/users/collective","html_url":"https://github.com/collective","followers_url":"https://api.github.com/users/collective/followers","following_url":"https://api.github.com/users/collective/following{/other_user}","gists_url":"https://api.github.com/users/collective/gists{/gist_id}","starred_url":"https://api.github.com/users/collective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collective/subscriptions","organizations_url":"https://api.github.com/users/collective/orgs","repos_url":"https://api.github.com/users/collective/repos","events_url":"https://api.github.com/users/collective/events{/privacy}","received_events_url":"https://api.github.com/users/collective/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/collective/collective.portlet.calendar","description":"This package provides a configurable implementation of a Calendar Portlet.","fork":false,"url":"https://api.github.com/repos/collective/collective.portlet.calendar","forks_url":"https://api.github.com/repos/collective/collective.portlet.calendar/forks","keys_url":"https://api.github.com/repos/collective/collective.portlet.calendar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/collective/collective.portlet.calendar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/collective/collective.portlet.calendar/teams","hooks_url":"https://api.github.com/repos/collective/collective.portlet.calendar/hooks","issue_events_url":"https://api.github.com/repos/collective/collective.portlet.calendar/issues/events{/number}","events_url":"https://api.github.com/repos/collective/collective.portlet.calendar/events","assignees_url":"https://api.github.com/repos/collective/collective.portlet.calendar/assignees{/user}","branches_url":"https://api.github.com/repos/collective/collective.portlet.calendar/branches{/branch}","tags_url":"https://api.github.com/repos/collective/collective.portlet.calendar/tags","blobs_url":"https://api.github.com/repos/collective/collective.portlet.calendar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/collective/collective.portlet.calendar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/collective/collective.portlet.calendar/git/refs{/sha}","trees_url":"https://api.github.com/repos/collective/collective.portlet.calendar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/collective/collective.portlet.calendar/statuses/{sha}","languages_url":"https://api.github.com/repos/collective/collective.portlet.calendar/languages","stargazers_url":"https://api.github.com/repos/collective/collective.portlet.calendar/stargazers","contributors_url":"https://api.github.com/repos/collective/collective.portlet.calendar/contributors","subscribers_url":"https://api.github.com/repos/collective/collective.portlet.calendar/subscribers","subscription_url":"https://api.github.com/repos/collective/collective.portlet.calendar/subscription","commits_url":"https://api.github.com/repos/collective/collective.portlet.calendar/commits{/sha}","git_commits_url":"https://api.github.com/repos/collective/collective.portlet.calendar/git/commits{/sha}","comments_url":"https://api.github.com/repos/collective/collective.portlet.calendar/comments{/number}","issue_comment_url":"https://api.github.com/repos/collective/collective.portlet.calendar/issues/comments{/number}","contents_url":"https://api.github.com/repos/collective/collective.portlet.calendar/contents/{+path}","compare_url":"https://api.github.com/repos/collective/collective.portlet.calendar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/collective/collective.portlet.calendar/merges","archive_url":"https://api.github.com/repos/collective/collective.portlet.calendar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/collective/collective.portlet.calendar/downloads","issues_url":"https://api.github.com/repos/collective/collective.portlet.calendar/issues{/number}","pulls_url":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls{/number}","milestones_url":"https://api.github.com/repos/collective/collective.portlet.calendar/milestones{/number}","notifications_url":"https://api.github.com/repos/collective/collective.portlet.calendar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/collective/collective.portlet.calendar/labels{/name}","releases_url":"https://api.github.com/repos/collective/collective.portlet.calendar/releases{/id}","created_at":"2012-02-10T19:30:04Z","updated_at":"2014-11-26T18:56:56Z","pushed_at":"2015-06-17T15:52:19Z","git_url":"git://github.com/collective/collective.portlet.calendar.git","ssh_url":"git@github.com:collective/collective.portlet.calendar.git","clone_url":"https://github.com/collective/collective.portlet.calendar.git","svn_url":"https://github.com/collective/collective.portlet.calendar","homepage":"","size":390,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls/6"},"html":{"href":"https://github.com/collective/collective.portlet.calendar/pull/6"},"issue":{"href":"https://api.github.com/repos/collective/collective.portlet.calendar/issues/6"},"comments":{"href":"https://api.github.com/repos/collective/collective.portlet.calendar/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/collective/collective.portlet.calendar/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/collective/collective.portlet.calendar/statuses/0d1a1db6135e513dae99a3da41384cacd473b197"}}}}