{"action":"created","comment":{"url":"https://api.github.com/repos/cozy/cozy-banks/pulls/comments/189856062","pull_request_review_id":122112917,"id":189856062,"diff_hunk":"@@ -55,6 +55,32 @@ const Separator = () => (\n const SCROLL_THRESOLD_TO_ACTIVATE_TOP_INFINITE_SCROLL = 150\n const getMonth = date => date.slice(0, 7)\n \n+// Performs successive `find`s until one of the find functions returns\n+// a result\n+const multiFind = (arr, findFns) => {\n+  for (let findFn of findFns) {\n+    const res = findFn(arr)\n+    if (res) {\n+      return res\n+    }\n+  }\n+  return null\n+}\n+\n+// The goal here is to find the first month having operations, closest\n+// to the chosen month. To know if we have to search in the past or the\n+// in the future, we check if the chosen month is before or after the\n+// current month.\n+const findNearestMonth = (chosenMonth, prevMonth, availableMonths) => {","path":"src/ducks/transactions/TransactionsPage.jsx","position":null,"original_position":20,"commit_id":"563e14b3cf21677d43a73a2949054bdbbbb48293","original_commit_id":"bf0c6c8948cda16855f6cdbf6a74a24ffd5cc406","user":{"login":"drazik","id":1606068,"avatar_url":"https://avatars3.githubusercontent.com/u/1606068?v=4","gravatar_id":"","url":"https://api.github.com/users/drazik","html_url":"https://github.com/drazik","followers_url":"https://api.github.com/users/drazik/followers","following_url":"https://api.github.com/users/drazik/following{/other_user}","gists_url":"https://api.github.com/users/drazik/gists{/gist_id}","starred_url":"https://api.github.com/users/drazik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drazik/subscriptions","organizations_url":"https://api.github.com/users/drazik/orgs","repos_url":"https://api.github.com/users/drazik/repos","events_url":"https://api.github.com/users/drazik/events{/privacy}","received_events_url":"https://api.github.com/users/drazik/received_events","type":"User","site_admin":false},"body":"Faute de frappe, je voulais évidemment écrire \"mois* courant\" :)","created_at":"2018-05-22T10:45:54Z","updated_at":"2018-05-22T10:45:54Z","html_url":"https://github.com/cozy/cozy-banks/pull/140#discussion_r189856062","pull_request_url":"https://api.github.com/repos/cozy/cozy-banks/pulls/140","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-banks/pulls/comments/189856062"},"html":{"href":"https://github.com/cozy/cozy-banks/pull/140#discussion_r189856062"},"pull_request":{"href":"https://api.github.com/repos/cozy/cozy-banks/pulls/140"}},"in_reply_to_id":189847749},"pull_request":{"url":"https://api.github.com/repos/cozy/cozy-banks/pulls/140","id":189609994,"html_url":"https://github.com/cozy/cozy-banks/pull/140","diff_url":"https://github.com/cozy/cozy-banks/pull/140.diff","patch_url":"https://github.com/cozy/cozy-banks/pull/140.patch","issue_url":"https://api.github.com/repos/cozy/cozy-banks/issues/140","number":140,"state":"open","locked":false,"title":"feat: repair select dates when going far away","user":{"login":"ptbrowne","id":465582,"avatar_url":"https://avatars1.githubusercontent.com/u/465582?v=4","gravatar_id":"","url":"https://api.github.com/users/ptbrowne","html_url":"https://github.com/ptbrowne","followers_url":"https://api.github.com/users/ptbrowne/followers","following_url":"https://api.github.com/users/ptbrowne/following{/other_user}","gists_url":"https://api.github.com/users/ptbrowne/gists{/gist_id}","starred_url":"https://api.github.com/users/ptbrowne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptbrowne/subscriptions","organizations_url":"https://api.github.com/users/ptbrowne/orgs","repos_url":"https://api.github.com/users/ptbrowne/repos","events_url":"https://api.github.com/users/ptbrowne/events{/privacy}","received_events_url":"https://api.github.com/users/ptbrowne/received_events","type":"User","site_admin":false},"body":"When selecting a date past the most ancient operation, we have to search in the opposite direction.","created_at":"2018-05-22T10:06:32Z","updated_at":"2018-05-22T10:45:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f2d9642897ce3692ddeda9bc60f150f5fc5a448","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kosssi","id":1135513,"avatar_url":"https://avatars2.githubusercontent.com/u/1135513?v=4","gravatar_id":"","url":"https://api.github.com/users/kosssi","html_url":"https://github.com/kosssi","followers_url":"https://api.github.com/users/kosssi/followers","following_url":"https://api.github.com/users/kosssi/following{/other_user}","gists_url":"https://api.github.com/users/kosssi/gists{/gist_id}","starred_url":"https://api.github.com/users/kosssi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kosssi/subscriptions","organizations_url":"https://api.github.com/users/kosssi/orgs","repos_url":"https://api.github.com/users/kosssi/repos","events_url":"https://api.github.com/users/kosssi/events{/privacy}","received_events_url":"https://api.github.com/users/kosssi/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cozy/cozy-banks/pulls/140/commits","review_comments_url":"https://api.github.com/repos/cozy/cozy-banks/pulls/140/comments","review_comment_url":"https://api.github.com/repos/cozy/cozy-banks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cozy/cozy-banks/issues/140/comments","statuses_url":"https://api.github.com/repos/cozy/cozy-banks/statuses/563e14b3cf21677d43a73a2949054bdbbbb48293","head":{"label":"cozy:fix-select-dates","ref":"fix-select-dates","sha":"563e14b3cf21677d43a73a2949054bdbbbb48293","user":{"login":"cozy","id":7690525,"avatar_url":"https://avatars0.githubusercontent.com/u/7690525?v=4","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"repo":{"id":127015178,"name":"cozy-banks","full_name":"cozy/cozy-banks","owner":{"login":"cozy","id":7690525,"avatar_url":"https://avatars0.githubusercontent.com/u/7690525?v=4","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cozy/cozy-banks","description":"A Banks Aggregator on Cozy","fork":false,"url":"https://api.github.com/repos/cozy/cozy-banks","forks_url":"https://api.github.com/repos/cozy/cozy-banks/forks","keys_url":"https://api.github.com/repos/cozy/cozy-banks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cozy/cozy-banks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cozy/cozy-banks/teams","hooks_url":"https://api.github.com/repos/cozy/cozy-banks/hooks","issue_events_url":"https://api.github.com/repos/cozy/cozy-banks/issues/events{/number}","events_url":"https://api.github.com/repos/cozy/cozy-banks/events","assignees_url":"https://api.github.com/repos/cozy/cozy-banks/assignees{/user}","branches_url":"https://api.github.com/repos/cozy/cozy-banks/branches{/branch}","tags_url":"https://api.github.com/repos/cozy/cozy-banks/tags","blobs_url":"https://api.github.com/repos/cozy/cozy-banks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cozy/cozy-banks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cozy/cozy-banks/git/refs{/sha}","trees_url":"https://api.github.com/repos/cozy/cozy-banks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cozy/cozy-banks/statuses/{sha}","languages_url":"https://api.github.com/repos/cozy/cozy-banks/languages","stargazers_url":"https://api.github.com/repos/cozy/cozy-banks/stargazers","contributors_url":"https://api.github.com/repos/cozy/cozy-banks/contributors","subscribers_url":"https://api.github.com/repos/cozy/cozy-banks/subscribers","subscription_url":"https://api.github.com/repos/cozy/cozy-banks/subscription","commits_url":"https://api.github.com/repos/cozy/cozy-banks/commits{/sha}","git_commits_url":"https://api.github.com/repos/cozy/cozy-banks/git/commits{/sha}","comments_url":"https://api.github.com/repos/cozy/cozy-banks/comments{/number}","issue_comment_url":"https://api.github.com/repos/cozy/cozy-banks/issues/comments{/number}","contents_url":"https://api.github.com/repos/cozy/cozy-banks/contents/{+path}","compare_url":"https://api.github.com/repos/cozy/cozy-banks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cozy/cozy-banks/merges","archive_url":"https://api.github.com/repos/cozy/cozy-banks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cozy/cozy-banks/downloads","issues_url":"https://api.github.com/repos/cozy/cozy-banks/issues{/number}","pulls_url":"https://api.github.com/repos/cozy/cozy-banks/pulls{/number}","milestones_url":"https://api.github.com/repos/cozy/cozy-banks/milestones{/number}","notifications_url":"https://api.github.com/repos/cozy/cozy-banks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cozy/cozy-banks/labels{/name}","releases_url":"https://api.github.com/repos/cozy/cozy-banks/releases{/id}","deployments_url":"https://api.github.com/repos/cozy/cozy-banks/deployments","created_at":"2018-03-27T16:24:37Z","updated_at":"2018-05-21T15:04:06Z","pushed_at":"2018-05-22T10:44:15Z","git_url":"git://github.com/cozy/cozy-banks.git","ssh_url":"git@github.com:cozy/cozy-banks.git","clone_url":"https://github.com/cozy/cozy-banks.git","svn_url":"https://github.com/cozy/cozy-banks","homepage":"https://cozy.io","size":76388,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":6,"open_issues":19,"watchers":1,"default_branch":"master"}},"base":{"label":"cozy:master","ref":"master","sha":"5b4cd055a2a0bbe44ce9984d7ff419c23cf2ac11","user":{"login":"cozy","id":7690525,"avatar_url":"https://avatars0.githubusercontent.com/u/7690525?v=4","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"repo":{"id":127015178,"name":"cozy-banks","full_name":"cozy/cozy-banks","owner":{"login":"cozy","id":7690525,"avatar_url":"https://avatars0.githubusercontent.com/u/7690525?v=4","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cozy/cozy-banks","description":"A Banks Aggregator on Cozy","fork":false,"url":"https://api.github.com/repos/cozy/cozy-banks","forks_url":"https://api.github.com/repos/cozy/cozy-banks/forks","keys_url":"https://api.github.com/repos/cozy/cozy-banks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cozy/cozy-banks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cozy/cozy-banks/teams","hooks_url":"https://api.github.com/repos/cozy/cozy-banks/hooks","issue_events_url":"https://api.github.com/repos/cozy/cozy-banks/issues/events{/number}","events_url":"https://api.github.com/repos/cozy/cozy-banks/events","assignees_url":"https://api.github.com/repos/cozy/cozy-banks/assignees{/user}","branches_url":"https://api.github.com/repos/cozy/cozy-banks/branches{/branch}","tags_url":"https://api.github.com/repos/cozy/cozy-banks/tags","blobs_url":"https://api.github.com/repos/cozy/cozy-banks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cozy/cozy-banks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cozy/cozy-banks/git/refs{/sha}","trees_url":"https://api.github.com/repos/cozy/cozy-banks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cozy/cozy-banks/statuses/{sha}","languages_url":"https://api.github.com/repos/cozy/cozy-banks/languages","stargazers_url":"https://api.github.com/repos/cozy/cozy-banks/stargazers","contributors_url":"https://api.github.com/repos/cozy/cozy-banks/contributors","subscribers_url":"https://api.github.com/repos/cozy/cozy-banks/subscribers","subscription_url":"https://api.github.com/repos/cozy/cozy-banks/subscription","commits_url":"https://api.github.com/repos/cozy/cozy-banks/commits{/sha}","git_commits_url":"https://api.github.com/repos/cozy/cozy-banks/git/commits{/sha}","comments_url":"https://api.github.com/repos/cozy/cozy-banks/comments{/number}","issue_comment_url":"https://api.github.com/repos/cozy/cozy-banks/issues/comments{/number}","contents_url":"https://api.github.com/repos/cozy/cozy-banks/contents/{+path}","compare_url":"https://api.github.com/repos/cozy/cozy-banks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cozy/cozy-banks/merges","archive_url":"https://api.github.com/repos/cozy/cozy-banks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cozy/cozy-banks/downloads","issues_url":"https://api.github.com/repos/cozy/cozy-banks/issues{/number}","pulls_url":"https://api.github.com/repos/cozy/cozy-banks/pulls{/number}","milestones_url":"https://api.github.com/repos/cozy/cozy-banks/milestones{/number}","notifications_url":"https://api.github.com/repos/cozy/cozy-banks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cozy/cozy-banks/labels{/name}","releases_url":"https://api.github.com/repos/cozy/cozy-banks/releases{/id}","deployments_url":"https://api.github.com/repos/cozy/cozy-banks/deployments","created_at":"2018-03-27T16:24:37Z","updated_at":"2018-05-21T15:04:06Z","pushed_at":"2018-05-22T10:44:15Z","git_url":"git://github.com/cozy/cozy-banks.git","ssh_url":"git@github.com:cozy/cozy-banks.git","clone_url":"https://github.com/cozy/cozy-banks.git","svn_url":"https://github.com/cozy/cozy-banks","homepage":"https://cozy.io","size":76388,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":6,"open_issues":19,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-banks/pulls/140"},"html":{"href":"https://github.com/cozy/cozy-banks/pull/140"},"issue":{"href":"https://api.github.com/repos/cozy/cozy-banks/issues/140"},"comments":{"href":"https://api.github.com/repos/cozy/cozy-banks/issues/140/comments"},"review_comments":{"href":"https://api.github.com/repos/cozy/cozy-banks/pulls/140/comments"},"review_comment":{"href":"https://api.github.com/repos/cozy/cozy-banks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cozy/cozy-banks/pulls/140/commits"},"statuses":{"href":"https://api.github.com/repos/cozy/cozy-banks/statuses/563e14b3cf21677d43a73a2949054bdbbbb48293"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"drazik"}}