{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls/comments/230697754","pull_request_review_id":171490128,"id":230697754,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDY5Nzc1NA==","diff_hunk":"@@ -15,41 +19,156 @@ const isStar = true;\n  * @returns {Object}\n  */\n function getAppropriateMoment(schedule, duration, workingHours) {\n-    console.info(schedule, duration, workingHours);\n+    const bankTimeZone = parseInt(workingHours.from.split('+')[1]);\n+    let oldResult = '';\n+    let result = findRoberyTime(schedule, duration, workingHours);\n \n     return {\n \n         /**\n          * Найдено ли время\n          * @returns {Boolean}\n          */\n-        exists: function () {\n-            return false;\n-        },\n+        exists: () => Boolean(result),\n \n         /**\n          * Возвращает отформатированную строку с часами для ограбления\n          * Например, \"Начинаем в %HH:%MM (%DD)\" -> \"Начинаем в 14:59 (СР)\"\n          * @param {String} template\n          * @returns {String}\n          */\n-        format: function (template) {\n-            return template;\n-        },\n+        format: template => ticksToDate(result || oldResult, template, bankTimeZone),\n \n         /**\n          * Попробовать найти часы для ограбления позже [*]\n          * @star\n          * @returns {Boolean}\n          */\n         tryLater: function () {\n+            if (result) {\n+                const start = new Date(result).getTime();\n+                const end = new Date(result + 30 * millisecondsInMinute).getTime();","path":"robbery.js","position":52,"original_position":52,"commit_id":"d72dd16ea0aa150dcfa6aa223d3a5bff4f2a0a7a","original_commit_id":"d72dd16ea0aa150dcfa6aa223d3a5bff4f2a0a7a","user":{"login":"FrodoTheTrue","id":9107905,"node_id":"MDQ6VXNlcjkxMDc5MDU=","avatar_url":"https://avatars2.githubusercontent.com/u/9107905?v=4","gravatar_id":"","url":"https://api.github.com/users/FrodoTheTrue","html_url":"https://github.com/FrodoTheTrue","followers_url":"https://api.github.com/users/FrodoTheTrue/followers","following_url":"https://api.github.com/users/FrodoTheTrue/following{/other_user}","gists_url":"https://api.github.com/users/FrodoTheTrue/gists{/gist_id}","starred_url":"https://api.github.com/users/FrodoTheTrue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrodoTheTrue/subscriptions","organizations_url":"https://api.github.com/users/FrodoTheTrue/orgs","repos_url":"https://api.github.com/users/FrodoTheTrue/repos","events_url":"https://api.github.com/users/FrodoTheTrue/events{/privacy}","received_events_url":"https://api.github.com/users/FrodoTheTrue/received_events","type":"User","site_admin":false},"body":"тоже константа","created_at":"2018-11-05T10:22:10Z","updated_at":"2018-11-05T10:22:10Z","html_url":"https://github.com/urfu-2018/javascript-task-3/pull/27#discussion_r230697754","pull_request_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls/27","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls/comments/230697754"},"html":{"href":"https://github.com/urfu-2018/javascript-task-3/pull/27#discussion_r230697754"},"pull_request":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls/27","id":226390078,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MzkwMDc4","html_url":"https://github.com/urfu-2018/javascript-task-3/pull/27","diff_url":"https://github.com/urfu-2018/javascript-task-3/pull/27.diff","patch_url":"https://github.com/urfu-2018/javascript-task-3/pull/27.patch","issue_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/issues/27","number":27,"state":"open","locked":false,"title":"Ильиных Иван","user":{"login":"evilPaprika","id":27489220,"node_id":"MDQ6VXNlcjI3NDg5MjIw","avatar_url":"https://avatars3.githubusercontent.com/u/27489220?v=4","gravatar_id":"","url":"https://api.github.com/users/evilPaprika","html_url":"https://github.com/evilPaprika","followers_url":"https://api.github.com/users/evilPaprika/followers","following_url":"https://api.github.com/users/evilPaprika/following{/other_user}","gists_url":"https://api.github.com/users/evilPaprika/gists{/gist_id}","starred_url":"https://api.github.com/users/evilPaprika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilPaprika/subscriptions","organizations_url":"https://api.github.com/users/evilPaprika/orgs","repos_url":"https://api.github.com/users/evilPaprika/repos","events_url":"https://api.github.com/users/evilPaprika/events{/privacy}","received_events_url":"https://api.github.com/users/evilPaprika/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-28T19:10:29Z","updated_at":"2018-11-05T10:22:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0c1d7e9386f92e96897d0a508f84681df867ad08","assignee":{"login":"FrodoTheTrue","id":9107905,"node_id":"MDQ6VXNlcjkxMDc5MDU=","avatar_url":"https://avatars2.githubusercontent.com/u/9107905?v=4","gravatar_id":"","url":"https://api.github.com/users/FrodoTheTrue","html_url":"https://github.com/FrodoTheTrue","followers_url":"https://api.github.com/users/FrodoTheTrue/followers","following_url":"https://api.github.com/users/FrodoTheTrue/following{/other_user}","gists_url":"https://api.github.com/users/FrodoTheTrue/gists{/gist_id}","starred_url":"https://api.github.com/users/FrodoTheTrue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrodoTheTrue/subscriptions","organizations_url":"https://api.github.com/users/FrodoTheTrue/orgs","repos_url":"https://api.github.com/users/FrodoTheTrue/repos","events_url":"https://api.github.com/users/FrodoTheTrue/events{/privacy}","received_events_url":"https://api.github.com/users/FrodoTheTrue/received_events","type":"User","site_admin":false},"assignees":[{"login":"FrodoTheTrue","id":9107905,"node_id":"MDQ6VXNlcjkxMDc5MDU=","avatar_url":"https://avatars2.githubusercontent.com/u/9107905?v=4","gravatar_id":"","url":"https://api.github.com/users/FrodoTheTrue","html_url":"https://github.com/FrodoTheTrue","followers_url":"https://api.github.com/users/FrodoTheTrue/followers","following_url":"https://api.github.com/users/FrodoTheTrue/following{/other_user}","gists_url":"https://api.github.com/users/FrodoTheTrue/gists{/gist_id}","starred_url":"https://api.github.com/users/FrodoTheTrue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrodoTheTrue/subscriptions","organizations_url":"https://api.github.com/users/FrodoTheTrue/orgs","repos_url":"https://api.github.com/users/FrodoTheTrue/repos","events_url":"https://api.github.com/users/FrodoTheTrue/events{/privacy}","received_events_url":"https://api.github.com/users/FrodoTheTrue/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls/27/commits","review_comments_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls/27/comments","review_comment_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/issues/27/comments","statuses_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/statuses/d72dd16ea0aa150dcfa6aa223d3a5bff4f2a0a7a","head":{"label":"evilPaprika:master","ref":"master","sha":"d72dd16ea0aa150dcfa6aa223d3a5bff4f2a0a7a","user":{"login":"evilPaprika","id":27489220,"node_id":"MDQ6VXNlcjI3NDg5MjIw","avatar_url":"https://avatars3.githubusercontent.com/u/27489220?v=4","gravatar_id":"","url":"https://api.github.com/users/evilPaprika","html_url":"https://github.com/evilPaprika","followers_url":"https://api.github.com/users/evilPaprika/followers","following_url":"https://api.github.com/users/evilPaprika/following{/other_user}","gists_url":"https://api.github.com/users/evilPaprika/gists{/gist_id}","starred_url":"https://api.github.com/users/evilPaprika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilPaprika/subscriptions","organizations_url":"https://api.github.com/users/evilPaprika/orgs","repos_url":"https://api.github.com/users/evilPaprika/repos","events_url":"https://api.github.com/users/evilPaprika/events{/privacy}","received_events_url":"https://api.github.com/users/evilPaprika/received_events","type":"User","site_admin":false},"repo":{"id":154466097,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ0NjYwOTc=","name":"javascript-task-3","full_name":"evilPaprika/javascript-task-3","private":false,"owner":{"login":"evilPaprika","id":27489220,"node_id":"MDQ6VXNlcjI3NDg5MjIw","avatar_url":"https://avatars3.githubusercontent.com/u/27489220?v=4","gravatar_id":"","url":"https://api.github.com/users/evilPaprika","html_url":"https://github.com/evilPaprika","followers_url":"https://api.github.com/users/evilPaprika/followers","following_url":"https://api.github.com/users/evilPaprika/following{/other_user}","gists_url":"https://api.github.com/users/evilPaprika/gists{/gist_id}","starred_url":"https://api.github.com/users/evilPaprika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilPaprika/subscriptions","organizations_url":"https://api.github.com/users/evilPaprika/orgs","repos_url":"https://api.github.com/users/evilPaprika/repos","events_url":"https://api.github.com/users/evilPaprika/events{/privacy}","received_events_url":"https://api.github.com/users/evilPaprika/received_events","type":"User","site_admin":false},"html_url":"https://github.com/evilPaprika/javascript-task-3","description":"Задача «0b11 друзей Аркадия»","fork":true,"url":"https://api.github.com/repos/evilPaprika/javascript-task-3","forks_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/forks","keys_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/teams","hooks_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/hooks","issue_events_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/issues/events{/number}","events_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/events","assignees_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/assignees{/user}","branches_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/branches{/branch}","tags_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/tags","blobs_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/statuses/{sha}","languages_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/languages","stargazers_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/stargazers","contributors_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/contributors","subscribers_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/subscribers","subscription_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/subscription","commits_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/contents/{+path}","compare_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/merges","archive_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/downloads","issues_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/issues{/number}","pulls_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/pulls{/number}","milestones_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/milestones{/number}","notifications_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/labels{/name}","releases_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/releases{/id}","deployments_url":"https://api.github.com/repos/evilPaprika/javascript-task-3/deployments","created_at":"2018-10-24T08:31:23Z","updated_at":"2018-11-04T19:48:30Z","pushed_at":"2018-11-04T19:48:29Z","git_url":"git://github.com/evilPaprika/javascript-task-3.git","ssh_url":"git@github.com:evilPaprika/javascript-task-3.git","clone_url":"https://github.com/evilPaprika/javascript-task-3.git","svn_url":"https://github.com/evilPaprika/javascript-task-3","homepage":null,"size":30,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"urfu-2018:master","ref":"master","sha":"e0945d9ddda85928c97dacdf1d9ab9dab532881b","user":{"login":"urfu-2018","id":43127233,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMTI3MjMz","avatar_url":"https://avatars0.githubusercontent.com/u/43127233?v=4","gravatar_id":"","url":"https://api.github.com/users/urfu-2018","html_url":"https://github.com/urfu-2018","followers_url":"https://api.github.com/users/urfu-2018/followers","following_url":"https://api.github.com/users/urfu-2018/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2018/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2018/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2018/subscriptions","organizations_url":"https://api.github.com/users/urfu-2018/orgs","repos_url":"https://api.github.com/users/urfu-2018/repos","events_url":"https://api.github.com/users/urfu-2018/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2018/received_events","type":"Organization","site_admin":false},"repo":{"id":154332622,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQzMzI2MjI=","name":"javascript-task-3","full_name":"urfu-2018/javascript-task-3","private":false,"owner":{"login":"urfu-2018","id":43127233,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMTI3MjMz","avatar_url":"https://avatars0.githubusercontent.com/u/43127233?v=4","gravatar_id":"","url":"https://api.github.com/users/urfu-2018","html_url":"https://github.com/urfu-2018","followers_url":"https://api.github.com/users/urfu-2018/followers","following_url":"https://api.github.com/users/urfu-2018/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2018/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2018/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2018/subscriptions","organizations_url":"https://api.github.com/users/urfu-2018/orgs","repos_url":"https://api.github.com/users/urfu-2018/repos","events_url":"https://api.github.com/users/urfu-2018/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2018/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/urfu-2018/javascript-task-3","description":"Задача «0b11 друзей Аркадия»","fork":false,"url":"https://api.github.com/repos/urfu-2018/javascript-task-3","forks_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/forks","keys_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/teams","hooks_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/hooks","issue_events_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/events","assignees_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/tags","blobs_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/languages","stargazers_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/stargazers","contributors_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/contributors","subscribers_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/subscribers","subscription_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/subscription","commits_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/merges","archive_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/downloads","issues_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/releases{/id}","deployments_url":"https://api.github.com/repos/urfu-2018/javascript-task-3/deployments","created_at":"2018-10-23T13:26:25Z","updated_at":"2018-10-23T13:34:04Z","pushed_at":"2018-11-05T10:16:09Z","git_url":"git://github.com/urfu-2018/javascript-task-3.git","ssh_url":"git@github.com:urfu-2018/javascript-task-3.git","clone_url":"https://github.com/urfu-2018/javascript-task-3.git","svn_url":"https://github.com/urfu-2018/javascript-task-3","homepage":null,"size":15,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":108,"mirror_url":null,"archived":false,"open_issues_count":53,"license":null,"forks":108,"open_issues":53,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls/27"},"html":{"href":"https://github.com/urfu-2018/javascript-task-3/pull/27"},"issue":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-3/issues/27"},"comments":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-3/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-3/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-3/statuses/d72dd16ea0aa150dcfa6aa223d3a5bff4f2a0a7a"}},"author_association":"NONE"}}
{"actor":{"display_login":"FrodoTheTrue"}}