payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls/comments/361945548","pull_request_review_id":337054518,"id":361945548,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM2MTk0NTU0OA==","diff_hunk":"@@ -96,23 +125,36 @@ public String beforeOrAfter(LocalDate someDate) {\n      * OffsetDateTime советуют использовать при записи даты в базу данных.\n      */\n     public OffsetDateTime offsetDateTime(LocalDateTime localTime) {\n-        return OffsetDateTime.now();\n+        return OffsetDateTime.of(localTime, ZoneOffset.of(\"+02:00\"));\n     }\n \n     /**\n      * Дана строка в виде \"yyyymmdd\".\n      * Необходимо вернуть Optional даты в LocalDate формате\n      */\n     public Optional<LocalDate> parseDate(String date) {\n-        return Optional.empty();\n+        try {\n+            int year = Integer.parseInt(date.substring(0, 4));\n+            int month = Integer.parseInt(date.substring(4, 6));\n+            int day = Integer.parseInt(date.substring(6, 8));\n+            return Optional.of(LocalDate.of(year, month, day));\n+        } catch (DateTimeException invalidValue) {\n+            return Optional.empty();\n+        }\n     }\n \n     /**\n      * Дана строка в виде \"d MMM yyyy\" (MMM - Sep, Oct, etc).\n      * Необходимо вернуть Optional даты в LocalDate формате\n      */\n     public Optional<LocalDate> customParseDate(String date) {\n-        return Optional.empty();\n+        try {\n+            DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"d MMM yyyy\", Locale.UK);","path":"src/main/java/core/basesyntax/JavaDateTimeApi.java","position":143,"original_position":143,"commit_id":"1df08d78e2573276ba045c896af9bedd940e5505","original_commit_id":"1df08d78e2573276ba045c896af9bedd940e5505","user":{"login":"MishaBeheka","id":46327654,"node_id":"MDQ6VXNlcjQ2MzI3NjU0","avatar_url":"https://avatars1.githubusercontent.com/u/46327654?v=4","gravatar_id":"","url":"https://api.github.com/users/MishaBeheka","html_url":"https://github.com/MishaBeheka","followers_url":"https://api.github.com/users/MishaBeheka/followers","following_url":"https://api.github.com/users/MishaBeheka/following{/other_user}","gists_url":"https://api.github.com/users/MishaBeheka/gists{/gist_id}","starred_url":"https://api.github.com/users/MishaBeheka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MishaBeheka/subscriptions","organizations_url":"https://api.github.com/users/MishaBeheka/orgs","repos_url":"https://api.github.com/users/MishaBeheka/repos","events_url":"https://api.github.com/users/MishaBeheka/events{/privacy}","received_events_url":"https://api.github.com/users/MishaBeheka/received_events","type":"User","site_admin":false},"body":"Done\r\n","created_at":"2019-12-30T10:03:50Z","updated_at":"2019-12-30T10:03:51Z","html_url":"https://github.com/mate-academy/jv-date-time-api/pull/41#discussion_r361945548","pull_request_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls/41","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls/comments/361945548"},"html":{"href":"https://github.com/mate-academy/jv-date-time-api/pull/41#discussion_r361945548"},"pull_request":{"href":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls/41"}},"in_reply_to_id":361936738},"pull_request":{"url":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls/41","id":357589683,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU3NTg5Njgz","html_url":"https://github.com/mate-academy/jv-date-time-api/pull/41","diff_url":"https://github.com/mate-academy/jv-date-time-api/pull/41.diff","patch_url":"https://github.com/mate-academy/jv-date-time-api/pull/41.patch","issue_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/issues/41","number":41,"state":"open","locked":false,"title":"Done_HW_12.2_Beheka Misha","user":{"login":"MishaBeheka","id":46327654,"node_id":"MDQ6VXNlcjQ2MzI3NjU0","avatar_url":"https://avatars1.githubusercontent.com/u/46327654?v=4","gravatar_id":"","url":"https://api.github.com/users/MishaBeheka","html_url":"https://github.com/MishaBeheka","followers_url":"https://api.github.com/users/MishaBeheka/followers","following_url":"https://api.github.com/users/MishaBeheka/following{/other_user}","gists_url":"https://api.github.com/users/MishaBeheka/gists{/gist_id}","starred_url":"https://api.github.com/users/MishaBeheka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MishaBeheka/subscriptions","organizations_url":"https://api.github.com/users/MishaBeheka/orgs","repos_url":"https://api.github.com/users/MishaBeheka/repos","events_url":"https://api.github.com/users/MishaBeheka/events{/privacy}","received_events_url":"https://api.github.com/users/MishaBeheka/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-12-28T22:53:48Z","updated_at":"2019-12-30T10:03:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fef37278255fcf60d37cca34f28e72a1633a8d44","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls/41/commits","review_comments_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls/41/comments","review_comment_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/issues/41/comments","statuses_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/statuses/1df08d78e2573276ba045c896af9bedd940e5505","head":{"label":"MishaBeheka:BehekaHW_12.2","ref":"BehekaHW_12.2","sha":"1df08d78e2573276ba045c896af9bedd940e5505","user":{"login":"MishaBeheka","id":46327654,"node_id":"MDQ6VXNlcjQ2MzI3NjU0","avatar_url":"https://avatars1.githubusercontent.com/u/46327654?v=4","gravatar_id":"","url":"https://api.github.com/users/MishaBeheka","html_url":"https://github.com/MishaBeheka","followers_url":"https://api.github.com/users/MishaBeheka/followers","following_url":"https://api.github.com/users/MishaBeheka/following{/other_user}","gists_url":"https://api.github.com/users/MishaBeheka/gists{/gist_id}","starred_url":"https://api.github.com/users/MishaBeheka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MishaBeheka/subscriptions","organizations_url":"https://api.github.com/users/MishaBeheka/orgs","repos_url":"https://api.github.com/users/MishaBeheka/repos","events_url":"https://api.github.com/users/MishaBeheka/events{/privacy}","received_events_url":"https://api.github.com/users/MishaBeheka/received_events","type":"User","site_admin":false},"repo":{"id":230426252,"node_id":"MDEwOlJlcG9zaXRvcnkyMzA0MjYyNTI=","name":"jv-date-time-api","full_name":"MishaBeheka/jv-date-time-api","private":false,"owner":{"login":"MishaBeheka","id":46327654,"node_id":"MDQ6VXNlcjQ2MzI3NjU0","avatar_url":"https://avatars1.githubusercontent.com/u/46327654?v=4","gravatar_id":"","url":"https://api.github.com/users/MishaBeheka","html_url":"https://github.com/MishaBeheka","followers_url":"https://api.github.com/users/MishaBeheka/followers","following_url":"https://api.github.com/users/MishaBeheka/following{/other_user}","gists_url":"https://api.github.com/users/MishaBeheka/gists{/gist_id}","starred_url":"https://api.github.com/users/MishaBeheka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MishaBeheka/subscriptions","organizations_url":"https://api.github.com/users/MishaBeheka/orgs","repos_url":"https://api.github.com/users/MishaBeheka/repos","events_url":"https://api.github.com/users/MishaBeheka/events{/privacy}","received_events_url":"https://api.github.com/users/MishaBeheka/received_events","type":"User","site_admin":false},"html_url":"https://github.com/MishaBeheka/jv-date-time-api","description":null,"fork":true,"url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api","forks_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/forks","keys_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/teams","hooks_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/hooks","issue_events_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/issues/events{/number}","events_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/events","assignees_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/assignees{/user}","branches_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/branches{/branch}","tags_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/tags","blobs_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/statuses/{sha}","languages_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/languages","stargazers_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/stargazers","contributors_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/contributors","subscribers_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/subscribers","subscription_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/subscription","commits_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/contents/{+path}","compare_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/merges","archive_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/downloads","issues_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/issues{/number}","pulls_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/pulls{/number}","milestones_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/milestones{/number}","notifications_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/labels{/name}","releases_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/releases{/id}","deployments_url":"https://api.github.com/repos/MishaBeheka/jv-date-time-api/deployments","created_at":"2019-12-27T10:45:37Z","updated_at":"2019-12-27T10:45:39Z","pushed_at":"2019-12-28T22:49:48Z","git_url":"git://github.com/MishaBeheka/jv-date-time-api.git","ssh_url":"git@github.com:MishaBeheka/jv-date-time-api.git","clone_url":"https://github.com/MishaBeheka/jv-date-time-api.git","svn_url":"https://github.com/MishaBeheka/jv-date-time-api","homepage":null,"size":10,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mate-academy:master","ref":"master","sha":"3c42c86149529e4d6001aaca9d1c6cac165c31fb","user":{"login":"mate-academy","id":28379899,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4Mzc5ODk5","avatar_url":"https://avatars1.githubusercontent.com/u/28379899?v=4","gravatar_id":"","url":"https://api.github.com/users/mate-academy","html_url":"https://github.com/mate-academy","followers_url":"https://api.github.com/users/mate-academy/followers","following_url":"https://api.github.com/users/mate-academy/following{/other_user}","gists_url":"https://api.github.com/users/mate-academy/gists{/gist_id}","starred_url":"https://api.github.com/users/mate-academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mate-academy/subscriptions","organizations_url":"https://api.github.com/users/mate-academy/orgs","repos_url":"https://api.github.com/users/mate-academy/repos","events_url":"https://api.github.com/users/mate-academy/events{/privacy}","received_events_url":"https://api.github.com/users/mate-academy/received_events","type":"Organization","site_admin":false},"repo":{"id":207286926,"node_id":"MDEwOlJlcG9zaXRvcnkyMDcyODY5MjY=","name":"jv-date-time-api","full_name":"mate-academy/jv-date-time-api","private":false,"owner":{"login":"mate-academy","id":28379899,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4Mzc5ODk5","avatar_url":"https://avatars1.githubusercontent.com/u/28379899?v=4","gravatar_id":"","url":"https://api.github.com/users/mate-academy","html_url":"https://github.com/mate-academy","followers_url":"https://api.github.com/users/mate-academy/followers","following_url":"https://api.github.com/users/mate-academy/following{/other_user}","gists_url":"https://api.github.com/users/mate-academy/gists{/gist_id}","starred_url":"https://api.github.com/users/mate-academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mate-academy/subscriptions","organizations_url":"https://api.github.com/users/mate-academy/orgs","repos_url":"https://api.github.com/users/mate-academy/repos","events_url":"https://api.github.com/users/mate-academy/events{/privacy}","received_events_url":"https://api.github.com/users/mate-academy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mate-academy/jv-date-time-api","description":null,"fork":false,"url":"https://api.github.com/repos/mate-academy/jv-date-time-api","forks_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/forks","keys_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/teams","hooks_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/hooks","issue_events_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/issues/events{/number}","events_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/events","assignees_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/assignees{/user}","branches_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/branches{/branch}","tags_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/tags","blobs_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/statuses/{sha}","languages_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/languages","stargazers_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/stargazers","contributors_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/contributors","subscribers_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/subscribers","subscription_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/subscription","commits_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/contents/{+path}","compare_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/merges","archive_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/downloads","issues_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/issues{/number}","pulls_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls{/number}","milestones_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/milestones{/number}","notifications_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/labels{/name}","releases_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/releases{/id}","deployments_url":"https://api.github.com/repos/mate-academy/jv-date-time-api/deployments","created_at":"2019-09-09T10:48:16Z","updated_at":"2019-09-23T14:25:35Z","pushed_at":"2019-12-30T10:00:51Z","git_url":"git://github.com/mate-academy/jv-date-time-api.git","ssh_url":"git@github.com:mate-academy/jv-date-time-api.git","clone_url":"https://github.com/mate-academy/jv-date-time-api.git","svn_url":"https://github.com/mate-academy/jv-date-time-api","homepage":null,"size":8,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":40,"license":null,"forks":47,"open_issues":40,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls/41"},"html":{"href":"https://github.com/mate-academy/jv-date-time-api/pull/41"},"issue":{"href":"https://api.github.com/repos/mate-academy/jv-date-time-api/issues/41"},"comments":{"href":"https://api.github.com/repos/mate-academy/jv-date-time-api/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mate-academy/jv-date-time-api/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/mate-academy/jv-date-time-api/statuses/1df08d78e2573276ba045c896af9bedd940e5505"}},"author_association":"NONE"}}
other: {"actor":{"display_login":"MishaBeheka"}}