{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls/comments/41542209","id":41542209,"diff_hunk":"@@ -2,3 +2,109 @@ var hours = process.argv[2];\n var minutes = process.argv[3];\n \n // Немного замечательного кода и магии\n+\n+if (hours < 0 || hours > 23 || minutes < 0 || minutes > 59) {\n+\tconsole.log('Время указано неверно');\n+\treturn;\n+}\n+else {\n+\tvar timeRoman = numberToRoman(hours) + ':' + numberToRoman(minutes);\n+\tprintASCII(timeRoman);\n+}\n+\n+function numberToRoman(number) {\n+\tvar numberRoman = '';\n+\tvar reverseListOfRomanNumber = [50, 40, 10, 9, 5, 4, 1];\n+\tvar dictOfRomanNumber = {\n+\t\t1: 'I',\n+\t\t4: 'IV',\n+\t\t5: 'V',\n+\t\t9: 'IX',\n+\t\t10: 'X',\n+\t\t40: 'XL',\n+\t\t50: 'L'\n+\t};\n+\t\n+\tfor (var i = 0; i < reverseListOfRomanNumber.length; i++)\n+\t{\n+\t\twhile (number >= reverseListOfRomanNumber[i])\n+\t\t{\n+\t\t\tnumberRoman += dictOfRomanNumber[reverseListOfRomanNumber[i]];\n+\t\t\tnumber -= reverseListOfRomanNumber[i];\n+\t\t}\n+\t}\n+\t\n+\tif (numberRoman == '') {\n+\t\treturn '-';\n+\t}\n+\t\n+\treturn numberRoman;\n+}\n+\n+function printASCII(time) {\n+\tvar symbolASCII = {\n+\t\t'I' : [ ' _  _  _  _  _ ',\n+\t\t\t\t'(_)(_)(_)(_)(_)',\n+\t\t\t\t'      (_)      ',\n+\t\t\t\t'      (_)      ',\n+\t\t\t\t'      (_)      ',\n+\t\t\t\t'      (_)      ',\n+\t\t\t\t' _  _ (_) _  _ ',\n+\t\t\t\t'(_)(_)(_)(_)(_)'],\n+\t\t\t\t\n+\t\t'V' : [\t' _           _ ',\n+\t\t\t\t'(_)         (_)',\n+\t\t\t\t'(_)         (_)',\n+\t\t\t\t'(_)_       _(_)',\n+\t\t\t\t'  (_)     (_)  ',\n+\t\t\t\t'   (_)   (_)   ',\n+\t\t\t\t'    (_)_(_)    ',\n+\t\t\t\t'      (_)      '],\n+\t\t\t\t\n+\t\t'X' : [\t' _           _ ',\n+\t\t\t\t'(_)_       _(_)',\n+\t\t\t\t'  (_)_   _(_)  ',\n+\t\t\t\t'    (_)_(_)    ',\n+\t\t\t\t'     _(_)_     ',\n+\t\t\t\t'   _(_) (_)_   ',\n+\t\t\t\t' _(_)     (_)_ ',\n+\t\t\t\t'(_)         (_)'],\n+\t\t\t\n+\t\t'L' : [\t' _             ',\n+\t\t\t\t'(_)            ',\n+\t\t\t\t'(_)            ',\n+\t\t\t\t'(_)            ',\n+\t\t\t\t'(_)            ',\n+\t\t\t\t'(_)            ',\n+\t\t\t\t'(_)            ',\n+\t\t\t\t'(_)(_)(_)(_)(_)'],\n+\t\t\t\t\n+\t\t':' : [ '     _  _      ',\n+\t\t\t\t'    (_)(_)     ',\n+\t\t\t\t'    (_)(_)     ',\n+\t\t\t\t'               ',\n+\t\t\t\t'     _  _      ',\n+\t\t\t\t'    (_)(_)     ',\n+\t\t\t\t'    (_)(_)     ',\n+\t\t\t\t'               '], \n+\t\t\n+\t\t'-' : [ '               ',\n+\t\t\t\t'               ',\n+\t\t\t\t'               ',\n+\t\t\t\t'(_)(_)(_)(_)(_)',\n+\t\t\t\t'(_)(_)(_)(_)(_)',\n+\t\t\t\t'               ',\n+\t\t\t\t'               ',\n+\t\t\t\t'               ']\n+\t\t}\n+\t\t\n+\t\tvar str = '';\n+\t\t\n+\t\tfor (var j = 0; j < 8; j++) {","path":"roman-time.js","position":102,"original_position":102,"commit_id":"85d023b5e88d98e78a4ec9f0e29f8f47f3b52053","original_commit_id":"85d023b5e88d98e78a4ec9f0e29f8f47f3b52053","user":{"login":"mangin","id":7918881,"avatar_url":"https://avatars.githubusercontent.com/u/7918881?v=3","gravatar_id":"","url":"https://api.github.com/users/mangin","html_url":"https://github.com/mangin","followers_url":"https://api.github.com/users/mangin/followers","following_url":"https://api.github.com/users/mangin/following{/other_user}","gists_url":"https://api.github.com/users/mangin/gists{/gist_id}","starred_url":"https://api.github.com/users/mangin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mangin/subscriptions","organizations_url":"https://api.github.com/users/mangin/orgs","repos_url":"https://api.github.com/users/mangin/repos","events_url":"https://api.github.com/users/mangin/events{/privacy}","received_events_url":"https://api.github.com/users/mangin/received_events","type":"User","site_admin":false},"body":"лучше константы выносить в переменные","created_at":"2015-10-08T17:24:45Z","updated_at":"2015-10-08T17:24:45Z","html_url":"https://github.com/urfu-2015/javascript-tasks-1/pull/74#discussion_r41542209","pull_request_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls/comments/41542209"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-1/pull/74#discussion_r41542209"},"pull_request":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls/74","id":46815879,"html_url":"https://github.com/urfu-2015/javascript-tasks-1/pull/74","diff_url":"https://github.com/urfu-2015/javascript-tasks-1/pull/74.diff","patch_url":"https://github.com/urfu-2015/javascript-tasks-1/pull/74.patch","issue_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/issues/74","number":74,"state":"open","locked":false,"title":"Грехов Кирилл","user":{"login":"Grehhov","id":14983600,"avatar_url":"https://avatars.githubusercontent.com/u/14983600?v=3","gravatar_id":"","url":"https://api.github.com/users/Grehhov","html_url":"https://github.com/Grehhov","followers_url":"https://api.github.com/users/Grehhov/followers","following_url":"https://api.github.com/users/Grehhov/following{/other_user}","gists_url":"https://api.github.com/users/Grehhov/gists{/gist_id}","starred_url":"https://api.github.com/users/Grehhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Grehhov/subscriptions","organizations_url":"https://api.github.com/users/Grehhov/orgs","repos_url":"https://api.github.com/users/Grehhov/repos","events_url":"https://api.github.com/users/Grehhov/events{/privacy}","received_events_url":"https://api.github.com/users/Grehhov/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-05T18:30:12Z","updated_at":"2015-10-08T17:24:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe5dad4220b6dbd76a688d49f207f6d172363b45","assignee":{"login":"mangin","id":7918881,"avatar_url":"https://avatars.githubusercontent.com/u/7918881?v=3","gravatar_id":"","url":"https://api.github.com/users/mangin","html_url":"https://github.com/mangin","followers_url":"https://api.github.com/users/mangin/followers","following_url":"https://api.github.com/users/mangin/following{/other_user}","gists_url":"https://api.github.com/users/mangin/gists{/gist_id}","starred_url":"https://api.github.com/users/mangin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mangin/subscriptions","organizations_url":"https://api.github.com/users/mangin/orgs","repos_url":"https://api.github.com/users/mangin/repos","events_url":"https://api.github.com/users/mangin/events{/privacy}","received_events_url":"https://api.github.com/users/mangin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls/74/commits","review_comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls/74/comments","review_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/issues/74/comments","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/statuses/85d023b5e88d98e78a4ec9f0e29f8f47f3b52053","head":{"label":"Grehhov:master","ref":"master","sha":"85d023b5e88d98e78a4ec9f0e29f8f47f3b52053","user":{"login":"Grehhov","id":14983600,"avatar_url":"https://avatars.githubusercontent.com/u/14983600?v=3","gravatar_id":"","url":"https://api.github.com/users/Grehhov","html_url":"https://github.com/Grehhov","followers_url":"https://api.github.com/users/Grehhov/followers","following_url":"https://api.github.com/users/Grehhov/following{/other_user}","gists_url":"https://api.github.com/users/Grehhov/gists{/gist_id}","starred_url":"https://api.github.com/users/Grehhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Grehhov/subscriptions","organizations_url":"https://api.github.com/users/Grehhov/orgs","repos_url":"https://api.github.com/users/Grehhov/repos","events_url":"https://api.github.com/users/Grehhov/events{/privacy}","received_events_url":"https://api.github.com/users/Grehhov/received_events","type":"User","site_admin":false},"repo":{"id":43704016,"name":"javascript-tasks-1","full_name":"Grehhov/javascript-tasks-1","owner":{"login":"Grehhov","id":14983600,"avatar_url":"https://avatars.githubusercontent.com/u/14983600?v=3","gravatar_id":"","url":"https://api.github.com/users/Grehhov","html_url":"https://github.com/Grehhov","followers_url":"https://api.github.com/users/Grehhov/followers","following_url":"https://api.github.com/users/Grehhov/following{/other_user}","gists_url":"https://api.github.com/users/Grehhov/gists{/gist_id}","starred_url":"https://api.github.com/users/Grehhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Grehhov/subscriptions","organizations_url":"https://api.github.com/users/Grehhov/orgs","repos_url":"https://api.github.com/users/Grehhov/repos","events_url":"https://api.github.com/users/Grehhov/events{/privacy}","received_events_url":"https://api.github.com/users/Grehhov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Grehhov/javascript-tasks-1","description":"Задача к лекции «Введение в Javascript»","fork":true,"url":"https://api.github.com/repos/Grehhov/javascript-tasks-1","forks_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/forks","keys_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/teams","hooks_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/hooks","issue_events_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/issues/events{/number}","events_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/events","assignees_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/assignees{/user}","branches_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/branches{/branch}","tags_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/tags","blobs_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/statuses/{sha}","languages_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/languages","stargazers_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/stargazers","contributors_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/contributors","subscribers_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/subscribers","subscription_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/subscription","commits_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/contents/{+path}","compare_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/merges","archive_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/downloads","issues_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/issues{/number}","pulls_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/pulls{/number}","milestones_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/milestones{/number}","notifications_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/labels{/name}","releases_url":"https://api.github.com/repos/Grehhov/javascript-tasks-1/releases{/id}","created_at":"2015-10-05T18:11:44Z","updated_at":"2015-10-05T18:11:44Z","pushed_at":"2015-10-08T14:44:03Z","git_url":"git://github.com/Grehhov/javascript-tasks-1.git","ssh_url":"git@github.com:Grehhov/javascript-tasks-1.git","clone_url":"https://github.com/Grehhov/javascript-tasks-1.git","svn_url":"https://github.com/Grehhov/javascript-tasks-1","homepage":null,"size":108,"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":"9f95181b7277c6920aac2370301d07fc7cbc4080","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":43342589,"name":"javascript-tasks-1","full_name":"urfu-2015/javascript-tasks-1","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-1","description":"Задача к лекции «Введение в Javascript» – «XXL»","fork":false,"url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1","forks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/forks","keys_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/teams","hooks_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/hooks","issue_events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/events","assignees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/tags","blobs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/languages","stargazers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/stargazers","contributors_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/contributors","subscribers_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/subscribers","subscription_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/subscription","commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/merges","archive_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/downloads","issues_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/releases{/id}","created_at":"2015-09-29T03:28:09Z","updated_at":"2015-10-08T14:08:28Z","pushed_at":"2015-10-08T16:58:43Z","git_url":"git://github.com/urfu-2015/javascript-tasks-1.git","ssh_url":"git@github.com:urfu-2015/javascript-tasks-1.git","clone_url":"https://github.com/urfu-2015/javascript-tasks-1.git","svn_url":"https://github.com/urfu-2015/javascript-tasks-1","homepage":"","size":1728,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":113,"mirror_url":null,"open_issues_count":60,"forks":113,"open_issues":60,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls/74"},"html":{"href":"https://github.com/urfu-2015/javascript-tasks-1/pull/74"},"issue":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/issues/74"},"comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2015/javascript-tasks-1/statuses/85d023b5e88d98e78a4ec9f0e29f8f47f3b52053"}}}}