{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/comments/44865578","id":44865578,"diff_hunk":"@@ -19,6 +21,167 @@ module.exports.getStatus = function (moment, robberyMoment) {\n         // «До ограбления остался 1 день 6 часов 59 минут»\n         return robberyMoment.fromMoment(moment);\n     }\n-\n     return 'Ограбление уже идёт!';\n };\n+\n+function getTimeInMinutesFromStartThisWeek(obj) {\n+    for (var person in obj) {\n+        var timing = obj[person];\n+        for (var i = 0; i < timing.length; i++) {\n+            timing[i].from = parseTime(timing[i].from);\n+            timing[i].to = parseTime(timing[i].to);\n+        }\n+    }\n+    return obj;\n+}\n+\n+function parseTime(dateTime) {\n+    if (dateTime.length < 10) {\n+        dateTime = 'ПН ' + dateTime;\n+    }\n+    var dayOfWeek = getIndexOfDayInWeek(dateTime.substr(0, 2));\n+    var timeFromStartWeek = getTime(dateTime);\n+    return (dayOfWeek * 24 * 60) + timeFromStartWeek;\n+}\n+\n+function getTime(dateTime) {\n+    var hours = parseInt(dateTime.substr(3, 2)) * 60;","path":"robbery.js","position":48,"original_position":48,"commit_id":"1739b661c99f5b3cf8e292110c559fc570d1a667","original_commit_id":"1739b661c99f5b3cf8e292110c559fc570d1a667","user":{"login":"gogoleff","id":4534405,"avatar_url":"https://avatars.githubusercontent.com/u/4534405?v=3","gravatar_id":"","url":"https://api.github.com/users/gogoleff","html_url":"https://github.com/gogoleff","followers_url":"https://api.github.com/users/gogoleff/followers","following_url":"https://api.github.com/users/gogoleff/following{/other_user}","gists_url":"https://api.github.com/users/gogoleff/gists{/gist_id}","starred_url":"https://api.github.com/users/gogoleff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gogoleff/subscriptions","organizations_url":"https://api.github.com/users/gogoleff/orgs","repos_url":"https://api.github.com/users/gogoleff/repos","events_url":"https://api.github.com/users/gogoleff/events{/privacy}","received_events_url":"https://api.github.com/users/gogoleff/received_events","type":"User","site_admin":false},"body":"Вторым параметром – систему счисления","created_at":"2015-11-14T23:56:15Z","updated_at":"2015-11-14T23:56:15Z","html_url":"https://github.com/urfu-2015/javascript-tasks-6/pull/18#discussion_r44865578","pull_request_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/comments/44865578"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-6/pull/18#discussion_r44865578"},"pull_request":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/18","id":50172008,"html_url":"https://github.com/urfu-2015/javascript-tasks-6/pull/18","diff_url":"https://github.com/urfu-2015/javascript-tasks-6/pull/18.diff","patch_url":"https://github.com/urfu-2015/javascript-tasks-6/pull/18.patch","issue_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/issues/18","number":18,"state":"open","locked":false,"title":"Maxim Vedernikov","user":{"login":"Vedmax","id":6930009,"avatar_url":"https://avatars.githubusercontent.com/u/6930009?v=3","gravatar_id":"","url":"https://api.github.com/users/Vedmax","html_url":"https://github.com/Vedmax","followers_url":"https://api.github.com/users/Vedmax/followers","following_url":"https://api.github.com/users/Vedmax/following{/other_user}","gists_url":"https://api.github.com/users/Vedmax/gists{/gist_id}","starred_url":"https://api.github.com/users/Vedmax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vedmax/subscriptions","organizations_url":"https://api.github.com/users/Vedmax/orgs","repos_url":"https://api.github.com/users/Vedmax/repos","events_url":"https://api.github.com/users/Vedmax/events{/privacy}","received_events_url":"https://api.github.com/users/Vedmax/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-09T20:19:58Z","updated_at":"2015-11-14T23:56:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e35b2703060696072345ff55986287dc57f645f","assignee":{"login":"gogoleff","id":4534405,"avatar_url":"https://avatars.githubusercontent.com/u/4534405?v=3","gravatar_id":"","url":"https://api.github.com/users/gogoleff","html_url":"https://github.com/gogoleff","followers_url":"https://api.github.com/users/gogoleff/followers","following_url":"https://api.github.com/users/gogoleff/following{/other_user}","gists_url":"https://api.github.com/users/gogoleff/gists{/gist_id}","starred_url":"https://api.github.com/users/gogoleff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gogoleff/subscriptions","organizations_url":"https://api.github.com/users/gogoleff/orgs","repos_url":"https://api.github.com/users/gogoleff/repos","events_url":"https://api.github.com/users/gogoleff/events{/privacy}","received_events_url":"https://api.github.com/users/gogoleff/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/18/commits","review_comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/18/comments","review_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/issues/18/comments","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/statuses/1739b661c99f5b3cf8e292110c559fc570d1a667","head":{"label":"Vedmax:master","ref":"master","sha":"1739b661c99f5b3cf8e292110c559fc570d1a667","user":{"login":"Vedmax","id":6930009,"avatar_url":"https://avatars.githubusercontent.com/u/6930009?v=3","gravatar_id":"","url":"https://api.github.com/users/Vedmax","html_url":"https://github.com/Vedmax","followers_url":"https://api.github.com/users/Vedmax/followers","following_url":"https://api.github.com/users/Vedmax/following{/other_user}","gists_url":"https://api.github.com/users/Vedmax/gists{/gist_id}","starred_url":"https://api.github.com/users/Vedmax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vedmax/subscriptions","organizations_url":"https://api.github.com/users/Vedmax/orgs","repos_url":"https://api.github.com/users/Vedmax/repos","events_url":"https://api.github.com/users/Vedmax/events{/privacy}","received_events_url":"https://api.github.com/users/Vedmax/received_events","type":"User","site_admin":false},"repo":{"id":45826782,"name":"javascript-tasks-6","full_name":"Vedmax/javascript-tasks-6","owner":{"login":"Vedmax","id":6930009,"avatar_url":"https://avatars.githubusercontent.com/u/6930009?v=3","gravatar_id":"","url":"https://api.github.com/users/Vedmax","html_url":"https://github.com/Vedmax","followers_url":"https://api.github.com/users/Vedmax/followers","following_url":"https://api.github.com/users/Vedmax/following{/other_user}","gists_url":"https://api.github.com/users/Vedmax/gists{/gist_id}","starred_url":"https://api.github.com/users/Vedmax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vedmax/subscriptions","organizations_url":"https://api.github.com/users/Vedmax/orgs","repos_url":"https://api.github.com/users/Vedmax/repos","events_url":"https://api.github.com/users/Vedmax/events{/privacy}","received_events_url":"https://api.github.com/users/Vedmax/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vedmax/javascript-tasks-6","description":"Задача к лекции « Объекты, Date, Math» – «0b11 друзей Оушена»","fork":true,"url":"https://api.github.com/repos/Vedmax/javascript-tasks-6","forks_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/forks","keys_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/teams","hooks_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/hooks","issue_events_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/issues/events{/number}","events_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/events","assignees_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/assignees{/user}","branches_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/branches{/branch}","tags_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/tags","blobs_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/statuses/{sha}","languages_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/languages","stargazers_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/stargazers","contributors_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/contributors","subscribers_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/subscribers","subscription_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/subscription","commits_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/contents/{+path}","compare_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/merges","archive_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/downloads","issues_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/issues{/number}","pulls_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/pulls{/number}","milestones_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/milestones{/number}","notifications_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/labels{/name}","releases_url":"https://api.github.com/repos/Vedmax/javascript-tasks-6/releases{/id}","created_at":"2015-11-09T09:02:34Z","updated_at":"2015-11-09T09:02:35Z","pushed_at":"2015-11-09T20:19:35Z","git_url":"git://github.com/Vedmax/javascript-tasks-6.git","ssh_url":"git@github.com:Vedmax/javascript-tasks-6.git","clone_url":"https://github.com/Vedmax/javascript-tasks-6.git","svn_url":"https://github.com/Vedmax/javascript-tasks-6","homepage":"","size":93,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"urfu-2015:master","ref":"master","sha":"a3e2b2a72420bc0195d457a39c732ae5151b04ea","user":{"login":"urfu-2015","id":14800971,"avatar_url":"https://avatars.githubusercontent.com/u/14800971?v=3","gravatar_id":"","url":"https://api.github.com/users/urfu-2015","html_url":"https://github.com/urfu-2015","followers_url":"https://api.github.com/users/urfu-2015/followers","following_url":"https://api.github.com/users/urfu-2015/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2015/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2015/subscriptions","organizations_url":"https://api.github.com/users/urfu-2015/orgs","repos_url":"https://api.github.com/users/urfu-2015/repos","events_url":"https://api.github.com/users/urfu-2015/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2015/received_events","type":"Organization","site_admin":false},"repo":{"id":45454584,"name":"javascript-tasks-6","full_name":"urfu-2015/javascript-tasks-6","owner":{"login":"urfu-2015","id":14800971,"avatar_url":"https://avatars.githubusercontent.com/u/14800971?v=3","gravatar_id":"","url":"https://api.github.com/users/urfu-2015","html_url":"https://github.com/urfu-2015","followers_url":"https://api.github.com/users/urfu-2015/followers","following_url":"https://api.github.com/users/urfu-2015/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2015/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2015/subscriptions","organizations_url":"https://api.github.com/users/urfu-2015/orgs","repos_url":"https://api.github.com/users/urfu-2015/repos","events_url":"https://api.github.com/users/urfu-2015/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2015/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/urfu-2015/javascript-tasks-6","description":"Задача к лекции « Объекты, Date, Math» – «0b11 друзей Оушена»","fork":false,"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6","forks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/forks","keys_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/teams","hooks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/hooks","issue_events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/events","assignees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/tags","blobs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/languages","stargazers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/stargazers","contributors_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/contributors","subscribers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/subscribers","subscription_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/subscription","commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/merges","archive_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/downloads","issues_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/releases{/id}","created_at":"2015-11-03T09:12:41Z","updated_at":"2015-11-03T14:38:37Z","pushed_at":"2015-11-14T21:06:21Z","git_url":"git://github.com/urfu-2015/javascript-tasks-6.git","ssh_url":"git@github.com:urfu-2015/javascript-tasks-6.git","clone_url":"https://github.com/urfu-2015/javascript-tasks-6.git","svn_url":"https://github.com/urfu-2015/javascript-tasks-6","homepage":"","size":1350,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":26,"forks":45,"open_issues":26,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/18"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-6/pull/18"},"issue":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/issues/18"},"comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/statuses/1739b661c99f5b3cf8e292110c559fc570d1a667"}}}}