{"action":"created","comment":{"url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls/comments/74804071","id":74804071,"diff_hunk":"@@ -0,0 +1,140 @@\n+package ua.goit.timonov.enterprise.module_6_2.view.console;\n+\n+import java.util.*;\n+\n+import static ua.goit.timonov.enterprise.module_6_2.view.console.ConsolePrinter.printLine;\n+\n+/**\n+ * Provides input of different data types from console: String, int, float, Date\n+ */\n+public class ConsoleInput {\n+\n+    public static final int MIN_YEAR_VALUE = 1900;\n+    public static final int MIN_MONTH_VALUE = 1;\n+    public static final int MAX_MONTH_VALUE = 12;\n+    public static final int MIN_DAY_VALUE = 1;\n+    public static final int DAYS_IN_LONG_MONTH = 31;\n+    public static final int DAYS_IN_SHORT_MONTH = 30;\n+    public static final int DAYS_IN_LONG_FEBRUARY = 29;\n+    public static final int DAYS_IN_SHORT_FEBRUARY = 28;\n+    public static final int FOUR = 4;\n+    public static final int HUNDRED = 100;\n+    public static final int FOUR_HUNDRED = 400;\n+\n+    /* list of month's numbers with 31 days in that month */\n+    private static List<Integer> longMonths = Arrays.asList(1, 3, 5, 7, 8, 10, 12);\n+\n+    /* list of month's numbers with 30 days in that month */\n+    private static List<Integer> shortMonths = Arrays.asList(4, 6, 9, 11);\n+\n+    /**\n+     * inputs String from console\n+     * @return      inputted string\n+     */\n+    public static String inputString() {\n+        Scanner sc = new Scanner(System.in);\n+        return sc.nextLine();\n+    }\n+\n+    /**\n+     * inputs int value from console\n+     * @return      inputted int value\n+     */\n+    public static int inputInteger() {\n+        while(true) {\n+            try {\n+                Scanner sc = new Scanner(System.in);\n+                return sc.nextInt();\n+            }\n+            catch (Exception e) {\n+                printLine(\"Wrong input! Please, input an integer value.\");\n+            }\n+        }\n+    }\n+\n+    /**\n+     * inputs int value from console, inputted value must be in defined interval including bounds\n+     * @param lowBound          interval's low bound\n+     * @param highBound         interval's high bound\n+     * @return                  inputted int value\n+     */\n+    public static int inputInteger(int lowBound, int highBound) {\n+        while(true) {","path":"src/main/java/ua/goit/timonov/enterprise/module_6_2/view/console/ConsoleInput.java","position":null,"original_position":62,"commit_id":"28d9ee92b04e89049e27bc088b292ade65987399","original_commit_id":"25b480ba5c016f0d90d304fb9afdf683ac1ccb33","user":{"login":"alextimonov","id":16335701,"avatar_url":"https://avatars.githubusercontent.com/u/16335701?v=3","gravatar_id":"","url":"https://api.github.com/users/alextimonov","html_url":"https://github.com/alextimonov","followers_url":"https://api.github.com/users/alextimonov/followers","following_url":"https://api.github.com/users/alextimonov/following{/other_user}","gists_url":"https://api.github.com/users/alextimonov/gists{/gist_id}","starred_url":"https://api.github.com/users/alextimonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alextimonov/subscriptions","organizations_url":"https://api.github.com/users/alextimonov/orgs","repos_url":"https://api.github.com/users/alextimonov/repos","events_url":"https://api.github.com/users/alextimonov/events{/privacy}","received_events_url":"https://api.github.com/users/alextimonov/received_events","type":"User","site_admin":false},"body":"fixed","created_at":"2016-08-15T18:00:45Z","updated_at":"2016-08-15T18:00:45Z","html_url":"https://github.com/alextimonov/GoJavaEnterprise/pull/4#discussion_r74804071","pull_request_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls/comments/74804071"},"html":{"href":"https://github.com/alextimonov/GoJavaEnterprise/pull/4#discussion_r74804071"},"pull_request":{"href":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls/4","id":80343332,"html_url":"https://github.com/alextimonov/GoJavaEnterprise/pull/4","diff_url":"https://github.com/alextimonov/GoJavaEnterprise/pull/4.diff","patch_url":"https://github.com/alextimonov/GoJavaEnterprise/pull/4.patch","issue_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/issues/4","number":4,"state":"open","locked":false,"title":"M6.2 jdbc app","user":{"login":"alextimonov","id":16335701,"avatar_url":"https://avatars.githubusercontent.com/u/16335701?v=3","gravatar_id":"","url":"https://api.github.com/users/alextimonov","html_url":"https://github.com/alextimonov","followers_url":"https://api.github.com/users/alextimonov/followers","following_url":"https://api.github.com/users/alextimonov/following{/other_user}","gists_url":"https://api.github.com/users/alextimonov/gists{/gist_id}","starred_url":"https://api.github.com/users/alextimonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alextimonov/subscriptions","organizations_url":"https://api.github.com/users/alextimonov/orgs","repos_url":"https://api.github.com/users/alextimonov/repos","events_url":"https://api.github.com/users/alextimonov/events{/privacy}","received_events_url":"https://api.github.com/users/alextimonov/received_events","type":"User","site_admin":false},"body":"Module 6.2 Application Restaurant with JDBC","created_at":"2016-08-06T15:46:50Z","updated_at":"2016-08-15T18:00:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"730df63e4374dec8b4f6043fb9c5f06cbd6d830c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls/4/commits","review_comments_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls/4/comments","review_comment_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/issues/4/comments","statuses_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/statuses/28d9ee92b04e89049e27bc088b292ade65987399","head":{"label":"alextimonov:M6.2_jdbcApp","ref":"M6.2_jdbcApp","sha":"28d9ee92b04e89049e27bc088b292ade65987399","user":{"login":"alextimonov","id":16335701,"avatar_url":"https://avatars.githubusercontent.com/u/16335701?v=3","gravatar_id":"","url":"https://api.github.com/users/alextimonov","html_url":"https://github.com/alextimonov","followers_url":"https://api.github.com/users/alextimonov/followers","following_url":"https://api.github.com/users/alextimonov/following{/other_user}","gists_url":"https://api.github.com/users/alextimonov/gists{/gist_id}","starred_url":"https://api.github.com/users/alextimonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alextimonov/subscriptions","organizations_url":"https://api.github.com/users/alextimonov/orgs","repos_url":"https://api.github.com/users/alextimonov/repos","events_url":"https://api.github.com/users/alextimonov/events{/privacy}","received_events_url":"https://api.github.com/users/alextimonov/received_events","type":"User","site_admin":false},"repo":{"id":59581892,"name":"GoJavaEnterprise","full_name":"alextimonov/GoJavaEnterprise","owner":{"login":"alextimonov","id":16335701,"avatar_url":"https://avatars.githubusercontent.com/u/16335701?v=3","gravatar_id":"","url":"https://api.github.com/users/alextimonov","html_url":"https://github.com/alextimonov","followers_url":"https://api.github.com/users/alextimonov/followers","following_url":"https://api.github.com/users/alextimonov/following{/other_user}","gists_url":"https://api.github.com/users/alextimonov/gists{/gist_id}","starred_url":"https://api.github.com/users/alextimonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alextimonov/subscriptions","organizations_url":"https://api.github.com/users/alextimonov/orgs","repos_url":"https://api.github.com/users/alextimonov/repos","events_url":"https://api.github.com/users/alextimonov/events{/privacy}","received_events_url":"https://api.github.com/users/alextimonov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alextimonov/GoJavaEnterprise","description":"Hometasks on GoJava Enterprise","fork":false,"url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise","forks_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/forks","keys_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/teams","hooks_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/hooks","issue_events_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/issues/events{/number}","events_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/events","assignees_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/assignees{/user}","branches_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/branches{/branch}","tags_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/tags","blobs_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/git/refs{/sha}","trees_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/statuses/{sha}","languages_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/languages","stargazers_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/stargazers","contributors_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/contributors","subscribers_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/subscribers","subscription_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/subscription","commits_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/commits{/sha}","git_commits_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/git/commits{/sha}","comments_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/comments{/number}","issue_comment_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/issues/comments{/number}","contents_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/contents/{+path}","compare_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/merges","archive_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/downloads","issues_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/issues{/number}","pulls_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls{/number}","milestones_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/milestones{/number}","notifications_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/labels{/name}","releases_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/releases{/id}","deployments_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/deployments","created_at":"2016-05-24T14:47:25Z","updated_at":"2016-05-24T14:48:11Z","pushed_at":"2016-08-15T17:57:55Z","git_url":"git://github.com/alextimonov/GoJavaEnterprise.git","ssh_url":"git@github.com:alextimonov/GoJavaEnterprise.git","clone_url":"https://github.com/alextimonov/GoJavaEnterprise.git","svn_url":"https://github.com/alextimonov/GoJavaEnterprise","homepage":null,"size":362,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"alextimonov:master","ref":"master","sha":"5d52c9624f5890b315a689f8e18986c49cb8a416","user":{"login":"alextimonov","id":16335701,"avatar_url":"https://avatars.githubusercontent.com/u/16335701?v=3","gravatar_id":"","url":"https://api.github.com/users/alextimonov","html_url":"https://github.com/alextimonov","followers_url":"https://api.github.com/users/alextimonov/followers","following_url":"https://api.github.com/users/alextimonov/following{/other_user}","gists_url":"https://api.github.com/users/alextimonov/gists{/gist_id}","starred_url":"https://api.github.com/users/alextimonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alextimonov/subscriptions","organizations_url":"https://api.github.com/users/alextimonov/orgs","repos_url":"https://api.github.com/users/alextimonov/repos","events_url":"https://api.github.com/users/alextimonov/events{/privacy}","received_events_url":"https://api.github.com/users/alextimonov/received_events","type":"User","site_admin":false},"repo":{"id":59581892,"name":"GoJavaEnterprise","full_name":"alextimonov/GoJavaEnterprise","owner":{"login":"alextimonov","id":16335701,"avatar_url":"https://avatars.githubusercontent.com/u/16335701?v=3","gravatar_id":"","url":"https://api.github.com/users/alextimonov","html_url":"https://github.com/alextimonov","followers_url":"https://api.github.com/users/alextimonov/followers","following_url":"https://api.github.com/users/alextimonov/following{/other_user}","gists_url":"https://api.github.com/users/alextimonov/gists{/gist_id}","starred_url":"https://api.github.com/users/alextimonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alextimonov/subscriptions","organizations_url":"https://api.github.com/users/alextimonov/orgs","repos_url":"https://api.github.com/users/alextimonov/repos","events_url":"https://api.github.com/users/alextimonov/events{/privacy}","received_events_url":"https://api.github.com/users/alextimonov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alextimonov/GoJavaEnterprise","description":"Hometasks on GoJava Enterprise","fork":false,"url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise","forks_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/forks","keys_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/teams","hooks_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/hooks","issue_events_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/issues/events{/number}","events_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/events","assignees_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/assignees{/user}","branches_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/branches{/branch}","tags_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/tags","blobs_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/git/refs{/sha}","trees_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/statuses/{sha}","languages_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/languages","stargazers_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/stargazers","contributors_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/contributors","subscribers_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/subscribers","subscription_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/subscription","commits_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/commits{/sha}","git_commits_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/git/commits{/sha}","comments_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/comments{/number}","issue_comment_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/issues/comments{/number}","contents_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/contents/{+path}","compare_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/merges","archive_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/downloads","issues_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/issues{/number}","pulls_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls{/number}","milestones_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/milestones{/number}","notifications_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/labels{/name}","releases_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/releases{/id}","deployments_url":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/deployments","created_at":"2016-05-24T14:47:25Z","updated_at":"2016-05-24T14:48:11Z","pushed_at":"2016-08-15T17:57:55Z","git_url":"git://github.com/alextimonov/GoJavaEnterprise.git","ssh_url":"git@github.com:alextimonov/GoJavaEnterprise.git","clone_url":"https://github.com/alextimonov/GoJavaEnterprise.git","svn_url":"https://github.com/alextimonov/GoJavaEnterprise","homepage":null,"size":362,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls/4"},"html":{"href":"https://github.com/alextimonov/GoJavaEnterprise/pull/4"},"issue":{"href":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/issues/4"},"comments":{"href":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/alextimonov/GoJavaEnterprise/statuses/28d9ee92b04e89049e27bc088b292ade65987399"}}}}
{"actor":{"display_login":"alextimonov"}}