{"action":"created","comment":{"url":"https://api.github.com/repos/denoland/deno_std/pulls/comments/245013007","pull_request_review_id":189027951,"id":245013007,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTAxMzAwNw==","diff_hunk":"@@ -0,0 +1,52 @@\n+export const parseDate = (dateStr: string, format: string): Date => {\n+  let m, d, y: string;\n+\n+  if (format === \"mm-dd-yyyy\") {\n+    const datePattern = /^(\\d{2})-(\\d{2})-(\\d{4})$/;\n+    [, m, d, y] = datePattern.exec(dateStr);\n+  } else if (format === \"dd-mm-yyyy\") {\n+    const datePattern = /^(\\d{2})-(\\d{2})-(\\d{4})$/;\n+    [, d, m, y] = datePattern.exec(dateStr);\n+  } else if (format === \"yyyy-mm-dd\") {\n+    const datePattern = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\n+    [, y, m, d] = datePattern.exec(dateStr);\n+  }\n+\n+  return new Date(Number(y), Number(m) - 1, Number(d));\n+};\n+\n+export const parseDateTime = (datetimeStr: string, format: string): Date => {","path":"datetime/mod.ts","position":18,"original_position":18,"commit_id":"e3335708fc701f340c3d243b8c31f5c0e8306239","original_commit_id":"e3335708fc701f340c3d243b8c31f5c0e8306239","user":{"login":"sh7dm","id":19504461,"node_id":"MDQ6VXNlcjE5NTA0NDYx","avatar_url":"https://avatars2.githubusercontent.com/u/19504461?v=4","gravatar_id":"","url":"https://api.github.com/users/sh7dm","html_url":"https://github.com/sh7dm","followers_url":"https://api.github.com/users/sh7dm/followers","following_url":"https://api.github.com/users/sh7dm/following{/other_user}","gists_url":"https://api.github.com/users/sh7dm/gists{/gist_id}","starred_url":"https://api.github.com/users/sh7dm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sh7dm/subscriptions","organizations_url":"https://api.github.com/users/sh7dm/orgs","repos_url":"https://api.github.com/users/sh7dm/repos","events_url":"https://api.github.com/users/sh7dm/events{/privacy}","received_events_url":"https://api.github.com/users/sh7dm/received_events","type":"User","site_admin":false},"body":"Ok","created_at":"2019-01-03T14:20:53Z","updated_at":"2019-01-03T14:20:54Z","html_url":"https://github.com/denoland/deno_std/pull/72#discussion_r245013007","pull_request_url":"https://api.github.com/repos/denoland/deno_std/pulls/72","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/denoland/deno_std/pulls/comments/245013007"},"html":{"href":"https://github.com/denoland/deno_std/pull/72#discussion_r245013007"},"pull_request":{"href":"https://api.github.com/repos/denoland/deno_std/pulls/72"}},"in_reply_to_id":245011590},"pull_request":{"url":"https://api.github.com/repos/denoland/deno_std/pulls/72","id":241996816,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxOTk2ODE2","html_url":"https://github.com/denoland/deno_std/pull/72","diff_url":"https://github.com/denoland/deno_std/pull/72.diff","patch_url":"https://github.com/denoland/deno_std/pull/72.patch","issue_url":"https://api.github.com/repos/denoland/deno_std/issues/72","number":72,"state":"open","locked":false,"title":"Add simple datetime module [WIP]","user":{"login":"sh7dm","id":19504461,"node_id":"MDQ6VXNlcjE5NTA0NDYx","avatar_url":"https://avatars2.githubusercontent.com/u/19504461?v=4","gravatar_id":"","url":"https://api.github.com/users/sh7dm","html_url":"https://github.com/sh7dm","followers_url":"https://api.github.com/users/sh7dm/followers","following_url":"https://api.github.com/users/sh7dm/following{/other_user}","gists_url":"https://api.github.com/users/sh7dm/gists{/gist_id}","starred_url":"https://api.github.com/users/sh7dm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sh7dm/subscriptions","organizations_url":"https://api.github.com/users/sh7dm/orgs","repos_url":"https://api.github.com/users/sh7dm/repos","events_url":"https://api.github.com/users/sh7dm/events{/privacy}","received_events_url":"https://api.github.com/users/sh7dm/received_events","type":"User","site_admin":false},"body":"Add simple datetime module. **:construction: WIP :construction:**\r\n\r\nResolves #67.","created_at":"2019-01-03T13:37:15Z","updated_at":"2019-01-03T14:20:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"babed1c9889bcb5ff177d963ff5023c9d5972e1a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/denoland/deno_std/pulls/72/commits","review_comments_url":"https://api.github.com/repos/denoland/deno_std/pulls/72/comments","review_comment_url":"https://api.github.com/repos/denoland/deno_std/pulls/comments{/number}","comments_url":"https://api.github.com/repos/denoland/deno_std/issues/72/comments","statuses_url":"https://api.github.com/repos/denoland/deno_std/statuses/e3335708fc701f340c3d243b8c31f5c0e8306239","head":{"label":"sh7dm:datetime","ref":"datetime","sha":"e3335708fc701f340c3d243b8c31f5c0e8306239","user":{"login":"sh7dm","id":19504461,"node_id":"MDQ6VXNlcjE5NTA0NDYx","avatar_url":"https://avatars2.githubusercontent.com/u/19504461?v=4","gravatar_id":"","url":"https://api.github.com/users/sh7dm","html_url":"https://github.com/sh7dm","followers_url":"https://api.github.com/users/sh7dm/followers","following_url":"https://api.github.com/users/sh7dm/following{/other_user}","gists_url":"https://api.github.com/users/sh7dm/gists{/gist_id}","starred_url":"https://api.github.com/users/sh7dm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sh7dm/subscriptions","organizations_url":"https://api.github.com/users/sh7dm/orgs","repos_url":"https://api.github.com/users/sh7dm/repos","events_url":"https://api.github.com/users/sh7dm/events{/privacy}","received_events_url":"https://api.github.com/users/sh7dm/received_events","type":"User","site_admin":false},"repo":{"id":163651662,"node_id":"MDEwOlJlcG9zaXRvcnkxNjM2NTE2NjI=","name":"deno_std","full_name":"sh7dm/deno_std","private":false,"owner":{"login":"sh7dm","id":19504461,"node_id":"MDQ6VXNlcjE5NTA0NDYx","avatar_url":"https://avatars2.githubusercontent.com/u/19504461?v=4","gravatar_id":"","url":"https://api.github.com/users/sh7dm","html_url":"https://github.com/sh7dm","followers_url":"https://api.github.com/users/sh7dm/followers","following_url":"https://api.github.com/users/sh7dm/following{/other_user}","gists_url":"https://api.github.com/users/sh7dm/gists{/gist_id}","starred_url":"https://api.github.com/users/sh7dm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sh7dm/subscriptions","organizations_url":"https://api.github.com/users/sh7dm/orgs","repos_url":"https://api.github.com/users/sh7dm/repos","events_url":"https://api.github.com/users/sh7dm/events{/privacy}","received_events_url":"https://api.github.com/users/sh7dm/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sh7dm/deno_std","description":"deno standard modules","fork":true,"url":"https://api.github.com/repos/sh7dm/deno_std","forks_url":"https://api.github.com/repos/sh7dm/deno_std/forks","keys_url":"https://api.github.com/repos/sh7dm/deno_std/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sh7dm/deno_std/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sh7dm/deno_std/teams","hooks_url":"https://api.github.com/repos/sh7dm/deno_std/hooks","issue_events_url":"https://api.github.com/repos/sh7dm/deno_std/issues/events{/number}","events_url":"https://api.github.com/repos/sh7dm/deno_std/events","assignees_url":"https://api.github.com/repos/sh7dm/deno_std/assignees{/user}","branches_url":"https://api.github.com/repos/sh7dm/deno_std/branches{/branch}","tags_url":"https://api.github.com/repos/sh7dm/deno_std/tags","blobs_url":"https://api.github.com/repos/sh7dm/deno_std/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sh7dm/deno_std/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sh7dm/deno_std/git/refs{/sha}","trees_url":"https://api.github.com/repos/sh7dm/deno_std/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sh7dm/deno_std/statuses/{sha}","languages_url":"https://api.github.com/repos/sh7dm/deno_std/languages","stargazers_url":"https://api.github.com/repos/sh7dm/deno_std/stargazers","contributors_url":"https://api.github.com/repos/sh7dm/deno_std/contributors","subscribers_url":"https://api.github.com/repos/sh7dm/deno_std/subscribers","subscription_url":"https://api.github.com/repos/sh7dm/deno_std/subscription","commits_url":"https://api.github.com/repos/sh7dm/deno_std/commits{/sha}","git_commits_url":"https://api.github.com/repos/sh7dm/deno_std/git/commits{/sha}","comments_url":"https://api.github.com/repos/sh7dm/deno_std/comments{/number}","issue_comment_url":"https://api.github.com/repos/sh7dm/deno_std/issues/comments{/number}","contents_url":"https://api.github.com/repos/sh7dm/deno_std/contents/{+path}","compare_url":"https://api.github.com/repos/sh7dm/deno_std/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sh7dm/deno_std/merges","archive_url":"https://api.github.com/repos/sh7dm/deno_std/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sh7dm/deno_std/downloads","issues_url":"https://api.github.com/repos/sh7dm/deno_std/issues{/number}","pulls_url":"https://api.github.com/repos/sh7dm/deno_std/pulls{/number}","milestones_url":"https://api.github.com/repos/sh7dm/deno_std/milestones{/number}","notifications_url":"https://api.github.com/repos/sh7dm/deno_std/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sh7dm/deno_std/labels{/name}","releases_url":"https://api.github.com/repos/sh7dm/deno_std/releases{/id}","deployments_url":"https://api.github.com/repos/sh7dm/deno_std/deployments","created_at":"2018-12-31T08:17:11Z","updated_at":"2019-01-03T11:17:32Z","pushed_at":"2019-01-03T14:13:49Z","git_url":"git://github.com/sh7dm/deno_std.git","ssh_url":"git@github.com:sh7dm/deno_std.git","clone_url":"https://github.com/sh7dm/deno_std.git","svn_url":"https://github.com/sh7dm/deno_std","homepage":"https://deno.land/x/","size":158,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"denoland:master","ref":"master","sha":"61fdae51a7cc50874b9674c40b1aef3fbf012494","user":{"login":"denoland","id":42048915,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMDQ4OTE1","avatar_url":"https://avatars1.githubusercontent.com/u/42048915?v=4","gravatar_id":"","url":"https://api.github.com/users/denoland","html_url":"https://github.com/denoland","followers_url":"https://api.github.com/users/denoland/followers","following_url":"https://api.github.com/users/denoland/following{/other_user}","gists_url":"https://api.github.com/users/denoland/gists{/gist_id}","starred_url":"https://api.github.com/users/denoland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denoland/subscriptions","organizations_url":"https://api.github.com/users/denoland/orgs","repos_url":"https://api.github.com/users/denoland/repos","events_url":"https://api.github.com/users/denoland/events{/privacy}","received_events_url":"https://api.github.com/users/denoland/received_events","type":"Organization","site_admin":false},"repo":{"id":156498505,"node_id":"MDEwOlJlcG9zaXRvcnkxNTY0OTg1MDU=","name":"deno_std","full_name":"denoland/deno_std","private":false,"owner":{"login":"denoland","id":42048915,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMDQ4OTE1","avatar_url":"https://avatars1.githubusercontent.com/u/42048915?v=4","gravatar_id":"","url":"https://api.github.com/users/denoland","html_url":"https://github.com/denoland","followers_url":"https://api.github.com/users/denoland/followers","following_url":"https://api.github.com/users/denoland/following{/other_user}","gists_url":"https://api.github.com/users/denoland/gists{/gist_id}","starred_url":"https://api.github.com/users/denoland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denoland/subscriptions","organizations_url":"https://api.github.com/users/denoland/orgs","repos_url":"https://api.github.com/users/denoland/repos","events_url":"https://api.github.com/users/denoland/events{/privacy}","received_events_url":"https://api.github.com/users/denoland/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/denoland/deno_std","description":"deno standard modules","fork":false,"url":"https://api.github.com/repos/denoland/deno_std","forks_url":"https://api.github.com/repos/denoland/deno_std/forks","keys_url":"https://api.github.com/repos/denoland/deno_std/keys{/key_id}","collaborators_url":"https://api.github.com/repos/denoland/deno_std/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/denoland/deno_std/teams","hooks_url":"https://api.github.com/repos/denoland/deno_std/hooks","issue_events_url":"https://api.github.com/repos/denoland/deno_std/issues/events{/number}","events_url":"https://api.github.com/repos/denoland/deno_std/events","assignees_url":"https://api.github.com/repos/denoland/deno_std/assignees{/user}","branches_url":"https://api.github.com/repos/denoland/deno_std/branches{/branch}","tags_url":"https://api.github.com/repos/denoland/deno_std/tags","blobs_url":"https://api.github.com/repos/denoland/deno_std/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/denoland/deno_std/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/denoland/deno_std/git/refs{/sha}","trees_url":"https://api.github.com/repos/denoland/deno_std/git/trees{/sha}","statuses_url":"https://api.github.com/repos/denoland/deno_std/statuses/{sha}","languages_url":"https://api.github.com/repos/denoland/deno_std/languages","stargazers_url":"https://api.github.com/repos/denoland/deno_std/stargazers","contributors_url":"https://api.github.com/repos/denoland/deno_std/contributors","subscribers_url":"https://api.github.com/repos/denoland/deno_std/subscribers","subscription_url":"https://api.github.com/repos/denoland/deno_std/subscription","commits_url":"https://api.github.com/repos/denoland/deno_std/commits{/sha}","git_commits_url":"https://api.github.com/repos/denoland/deno_std/git/commits{/sha}","comments_url":"https://api.github.com/repos/denoland/deno_std/comments{/number}","issue_comment_url":"https://api.github.com/repos/denoland/deno_std/issues/comments{/number}","contents_url":"https://api.github.com/repos/denoland/deno_std/contents/{+path}","compare_url":"https://api.github.com/repos/denoland/deno_std/compare/{base}...{head}","merges_url":"https://api.github.com/repos/denoland/deno_std/merges","archive_url":"https://api.github.com/repos/denoland/deno_std/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/denoland/deno_std/downloads","issues_url":"https://api.github.com/repos/denoland/deno_std/issues{/number}","pulls_url":"https://api.github.com/repos/denoland/deno_std/pulls{/number}","milestones_url":"https://api.github.com/repos/denoland/deno_std/milestones{/number}","notifications_url":"https://api.github.com/repos/denoland/deno_std/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/denoland/deno_std/labels{/name}","releases_url":"https://api.github.com/repos/denoland/deno_std/releases{/id}","deployments_url":"https://api.github.com/repos/denoland/deno_std/deployments","created_at":"2018-11-07T06:10:08Z","updated_at":"2019-01-03T12:40:47Z","pushed_at":"2019-01-03T14:13:51Z","git_url":"git://github.com/denoland/deno_std.git","ssh_url":"git@github.com:denoland/deno_std.git","clone_url":"https://github.com/denoland/deno_std.git","svn_url":"https://github.com/denoland/deno_std","homepage":"https://deno.land/x/","size":154,"stargazers_count":213,"watchers_count":213,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":19,"open_issues":18,"watchers":213,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/denoland/deno_std/pulls/72"},"html":{"href":"https://github.com/denoland/deno_std/pull/72"},"issue":{"href":"https://api.github.com/repos/denoland/deno_std/issues/72"},"comments":{"href":"https://api.github.com/repos/denoland/deno_std/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/denoland/deno_std/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/denoland/deno_std/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/denoland/deno_std/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/denoland/deno_std/statuses/e3335708fc701f340c3d243b8c31f5c0e8306239"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sh7dm"}}