{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/comments/44868983","id":44868983,"diff_hunk":"@@ -2,6 +2,152 @@\n \n var moment = require('./moment');\n \n+function sliceAndParse(string, index) {\n+    return parseInt(string.slice(index, index + 2));\n+}\n+\n+function convertToUTC(schedule, offset) {\n+    var result = {\n+        from: [],\n+        to: []\n+    };\n+    var hoursFrom = schedule['from'].slice(0, 2);\n+    var hoursTo = schedule['to'].slice(0, 2);\n+    var anyDate = new Date;\n+    anyDate.setHours(hoursFrom - offset);\n+    var newHoursFrom = anyDate.getHours();\n+    anyDate.setHours(hoursTo - offset);\n+    var newHoursTo = anyDate.getHours();\n+    result['from'].push(newHoursFrom);\n+    result['from'].push(sliceAndParse(schedule['from'], 3));\n+    result['to'].push(newHoursTo);\n+    result['to'].push(sliceAndParse(schedule['to'], 3));\n+    return result;\n+}\n+\n+function setHHMM(time, arrayOfSettings, dayOfTheWeek) {\n+    time.setHours(arrayOfSettings[0]);\n+    time.setMinutes(arrayOfSettings[1]);\n+    if (typeof dayOfTheWeek !== 'undefined') {\n+        while (time.getDay() !== dayOfTheWeek) {\n+            time.setDate(time.getDate() + 1);\n+        }\n+        //console.log(time, dayOfTheWeek);\n+    }\n+}\n+\n+function fillSchedule(schedule) {\n+    var result = {};\n+    for (var i in schedule) {\n+        result[i] = [];\n+    }\n+    var week = ['ВС', 'ПН', 'ВТ', 'СР'];","path":"robbery.js","position":43,"original_position":43,"commit_id":"d8fe12a5efa4c21955217dacaef1f2690f81861e","original_commit_id":"d8fe12a5efa4c21955217dacaef1f2690f81861e","user":{"login":"mokhov","id":357689,"avatar_url":"https://avatars.githubusercontent.com/u/357689?v=3","gravatar_id":"","url":"https://api.github.com/users/mokhov","html_url":"https://github.com/mokhov","followers_url":"https://api.github.com/users/mokhov/followers","following_url":"https://api.github.com/users/mokhov/following{/other_user}","gists_url":"https://api.github.com/users/mokhov/gists{/gist_id}","starred_url":"https://api.github.com/users/mokhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mokhov/subscriptions","organizations_url":"https://api.github.com/users/mokhov/orgs","repos_url":"https://api.github.com/users/mokhov/repos","events_url":"https://api.github.com/users/mokhov/events{/privacy}","received_events_url":"https://api.github.com/users/mokhov/received_events","type":"User","site_admin":false},"body":"Ещё может быть четверг, внезапно, если у нас будет +12 часовой пояс","created_at":"2015-11-15T08:32:33Z","updated_at":"2015-11-15T08:32:33Z","html_url":"https://github.com/urfu-2015/javascript-tasks-6/pull/33#discussion_r44868983","pull_request_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/comments/44868983"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-6/pull/33#discussion_r44868983"},"pull_request":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/33","id":50328991,"html_url":"https://github.com/urfu-2015/javascript-tasks-6/pull/33","diff_url":"https://github.com/urfu-2015/javascript-tasks-6/pull/33.diff","patch_url":"https://github.com/urfu-2015/javascript-tasks-6/pull/33.patch","issue_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/issues/33","number":33,"state":"open","locked":false,"title":"Гуральник Дарья","user":{"login":"Lucifer-is-my-pet","id":6801611,"avatar_url":"https://avatars.githubusercontent.com/u/6801611?v=3","gravatar_id":"","url":"https://api.github.com/users/Lucifer-is-my-pet","html_url":"https://github.com/Lucifer-is-my-pet","followers_url":"https://api.github.com/users/Lucifer-is-my-pet/followers","following_url":"https://api.github.com/users/Lucifer-is-my-pet/following{/other_user}","gists_url":"https://api.github.com/users/Lucifer-is-my-pet/gists{/gist_id}","starred_url":"https://api.github.com/users/Lucifer-is-my-pet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lucifer-is-my-pet/subscriptions","organizations_url":"https://api.github.com/users/Lucifer-is-my-pet/orgs","repos_url":"https://api.github.com/users/Lucifer-is-my-pet/repos","events_url":"https://api.github.com/users/Lucifer-is-my-pet/events{/privacy}","received_events_url":"https://api.github.com/users/Lucifer-is-my-pet/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-10T23:45:58Z","updated_at":"2015-11-15T08:32:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"89e0f29126c0c48c1022ab44281b7e0c51c5773b","assignee":{"login":"mokhov","id":357689,"avatar_url":"https://avatars.githubusercontent.com/u/357689?v=3","gravatar_id":"","url":"https://api.github.com/users/mokhov","html_url":"https://github.com/mokhov","followers_url":"https://api.github.com/users/mokhov/followers","following_url":"https://api.github.com/users/mokhov/following{/other_user}","gists_url":"https://api.github.com/users/mokhov/gists{/gist_id}","starred_url":"https://api.github.com/users/mokhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mokhov/subscriptions","organizations_url":"https://api.github.com/users/mokhov/orgs","repos_url":"https://api.github.com/users/mokhov/repos","events_url":"https://api.github.com/users/mokhov/events{/privacy}","received_events_url":"https://api.github.com/users/mokhov/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/33/commits","review_comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/33/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/33/comments","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/statuses/d8fe12a5efa4c21955217dacaef1f2690f81861e","head":{"label":"Lucifer-is-my-pet:master","ref":"master","sha":"d8fe12a5efa4c21955217dacaef1f2690f81861e","user":{"login":"Lucifer-is-my-pet","id":6801611,"avatar_url":"https://avatars.githubusercontent.com/u/6801611?v=3","gravatar_id":"","url":"https://api.github.com/users/Lucifer-is-my-pet","html_url":"https://github.com/Lucifer-is-my-pet","followers_url":"https://api.github.com/users/Lucifer-is-my-pet/followers","following_url":"https://api.github.com/users/Lucifer-is-my-pet/following{/other_user}","gists_url":"https://api.github.com/users/Lucifer-is-my-pet/gists{/gist_id}","starred_url":"https://api.github.com/users/Lucifer-is-my-pet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lucifer-is-my-pet/subscriptions","organizations_url":"https://api.github.com/users/Lucifer-is-my-pet/orgs","repos_url":"https://api.github.com/users/Lucifer-is-my-pet/repos","events_url":"https://api.github.com/users/Lucifer-is-my-pet/events{/privacy}","received_events_url":"https://api.github.com/users/Lucifer-is-my-pet/received_events","type":"User","site_admin":false},"repo":{"id":45621215,"name":"javascript-tasks-6","full_name":"Lucifer-is-my-pet/javascript-tasks-6","owner":{"login":"Lucifer-is-my-pet","id":6801611,"avatar_url":"https://avatars.githubusercontent.com/u/6801611?v=3","gravatar_id":"","url":"https://api.github.com/users/Lucifer-is-my-pet","html_url":"https://github.com/Lucifer-is-my-pet","followers_url":"https://api.github.com/users/Lucifer-is-my-pet/followers","following_url":"https://api.github.com/users/Lucifer-is-my-pet/following{/other_user}","gists_url":"https://api.github.com/users/Lucifer-is-my-pet/gists{/gist_id}","starred_url":"https://api.github.com/users/Lucifer-is-my-pet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lucifer-is-my-pet/subscriptions","organizations_url":"https://api.github.com/users/Lucifer-is-my-pet/orgs","repos_url":"https://api.github.com/users/Lucifer-is-my-pet/repos","events_url":"https://api.github.com/users/Lucifer-is-my-pet/events{/privacy}","received_events_url":"https://api.github.com/users/Lucifer-is-my-pet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Lucifer-is-my-pet/javascript-tasks-6","description":"Задача к лекции « Объекты, Date, Math» – «0b11 друзей Оушена»","fork":true,"url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6","forks_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/forks","keys_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/teams","hooks_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/hooks","issue_events_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/issues/events{/number}","events_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/events","assignees_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/assignees{/user}","branches_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/branches{/branch}","tags_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/tags","blobs_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/git/refs{/sha}","trees_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/statuses/{sha}","languages_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/languages","stargazers_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/stargazers","contributors_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/contributors","subscribers_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/subscribers","subscription_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/subscription","commits_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/commits{/sha}","git_commits_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/git/commits{/sha}","comments_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/comments{/number}","issue_comment_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/issues/comments{/number}","contents_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/contents/{+path}","compare_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/merges","archive_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/downloads","issues_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/issues{/number}","pulls_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/pulls{/number}","milestones_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/milestones{/number}","notifications_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/labels{/name}","releases_url":"https://api.github.com/repos/Lucifer-is-my-pet/javascript-tasks-6/releases{/id}","created_at":"2015-11-05T15:44:16Z","updated_at":"2015-11-05T15:44:17Z","pushed_at":"2015-11-12T04:38:10Z","git_url":"git://github.com/Lucifer-is-my-pet/javascript-tasks-6.git","ssh_url":"git@github.com:Lucifer-is-my-pet/javascript-tasks-6.git","clone_url":"https://github.com/Lucifer-is-my-pet/javascript-tasks-6.git","svn_url":"https://github.com/Lucifer-is-my-pet/javascript-tasks-6","homepage":"","size":98,"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/33"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-6/pull/33"},"issue":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/issues/33"},"comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/pulls/33/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/33/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-6/statuses/d8fe12a5efa4c21955217dacaef1f2690f81861e"}}}}