{"action":"created","comment":{"url":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls/comments/130420417","pull_request_review_id":53294513,"id":130420417,"diff_hunk":"@@ -0,0 +1,25 @@\n+const { mockEvents } = require('../../database/events_schema.js');\n+\n+const getAllEvents = (hbs, response) => {\n+  mockEvents.find({}, (error, events) => {\n+    if (error) response.render('not_found')\n+    else {\n+      let upcomingEvents = [];\n+      let pastEvents = [];\n+      events.forEach((event) => {\n+        if(event.eventDate > new Date()) {","path":"src/actions/get_all_events.js","position":10,"original_position":10,"commit_id":"1af3004e2bf9da80439bc3b707276d214d8440ee","original_commit_id":"1af3004e2bf9da80439bc3b707276d214d8440ee","user":{"login":"Suuuuha","id":24496866,"avatar_url":"https://avatars1.githubusercontent.com/u/24496866?v=4","gravatar_id":"","url":"https://api.github.com/users/Suuuuha","html_url":"https://github.com/Suuuuha","followers_url":"https://api.github.com/users/Suuuuha/followers","following_url":"https://api.github.com/users/Suuuuha/following{/other_user}","gists_url":"https://api.github.com/users/Suuuuha/gists{/gist_id}","starred_url":"https://api.github.com/users/Suuuuha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Suuuuha/subscriptions","organizations_url":"https://api.github.com/users/Suuuuha/orgs","repos_url":"https://api.github.com/users/Suuuuha/repos","events_url":"https://api.github.com/users/Suuuuha/events{/privacy}","received_events_url":"https://api.github.com/users/Suuuuha/received_events","type":"User","site_admin":false},"body":"Javascript has no problem with dates in if statement and its working, and I think event.eventDate returns the same date eyntax.\r\nAnd for the date format we have a helper function to change it to String when its rendered to the page.","created_at":"2017-07-31T18:16:32Z","updated_at":"2017-07-31T18:16:33Z","html_url":"https://github.com/UKITH/Arabs-Startups/pull/107#discussion_r130420417","pull_request_url":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls/107","_links":{"self":{"href":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls/comments/130420417"},"html":{"href":"https://github.com/UKITH/Arabs-Startups/pull/107#discussion_r130420417"},"pull_request":{"href":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls/107"}}},"pull_request":{"url":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls/107","id":132037982,"html_url":"https://github.com/UKITH/Arabs-Startups/pull/107","diff_url":"https://github.com/UKITH/Arabs-Startups/pull/107.diff","patch_url":"https://github.com/UKITH/Arabs-Startups/pull/107.patch","issue_url":"https://api.github.com/repos/UKITH/Arabs-Startups/issues/107","number":107,"state":"open","locked":false,"title":"All events functionality","user":{"login":"Suuuuha","id":24496866,"avatar_url":"https://avatars1.githubusercontent.com/u/24496866?v=4","gravatar_id":"","url":"https://api.github.com/users/Suuuuha","html_url":"https://github.com/Suuuuha","followers_url":"https://api.github.com/users/Suuuuha/followers","following_url":"https://api.github.com/users/Suuuuha/following{/other_user}","gists_url":"https://api.github.com/users/Suuuuha/gists{/gist_id}","starred_url":"https://api.github.com/users/Suuuuha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Suuuuha/subscriptions","organizations_url":"https://api.github.com/users/Suuuuha/orgs","repos_url":"https://api.github.com/users/Suuuuha/repos","events_url":"https://api.github.com/users/Suuuuha/events{/privacy}","received_events_url":"https://api.github.com/users/Suuuuha/received_events","type":"User","site_admin":false},"body":"related to #106 ","created_at":"2017-07-24T12:26:59Z","updated_at":"2017-07-31T18:16:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03bb156f9c0253367ca62d6195629e10551f173a","assignee":{"login":"esraajb","id":21229375,"avatar_url":"https://avatars2.githubusercontent.com/u/21229375?v=4","gravatar_id":"","url":"https://api.github.com/users/esraajb","html_url":"https://github.com/esraajb","followers_url":"https://api.github.com/users/esraajb/followers","following_url":"https://api.github.com/users/esraajb/following{/other_user}","gists_url":"https://api.github.com/users/esraajb/gists{/gist_id}","starred_url":"https://api.github.com/users/esraajb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esraajb/subscriptions","organizations_url":"https://api.github.com/users/esraajb/orgs","repos_url":"https://api.github.com/users/esraajb/repos","events_url":"https://api.github.com/users/esraajb/events{/privacy}","received_events_url":"https://api.github.com/users/esraajb/received_events","type":"User","site_admin":false},"assignees":[{"login":"esraajb","id":21229375,"avatar_url":"https://avatars2.githubusercontent.com/u/21229375?v=4","gravatar_id":"","url":"https://api.github.com/users/esraajb","html_url":"https://github.com/esraajb","followers_url":"https://api.github.com/users/esraajb/followers","following_url":"https://api.github.com/users/esraajb/following{/other_user}","gists_url":"https://api.github.com/users/esraajb/gists{/gist_id}","starred_url":"https://api.github.com/users/esraajb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esraajb/subscriptions","organizations_url":"https://api.github.com/users/esraajb/orgs","repos_url":"https://api.github.com/users/esraajb/repos","events_url":"https://api.github.com/users/esraajb/events{/privacy}","received_events_url":"https://api.github.com/users/esraajb/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls/107/commits","review_comments_url":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls/107/comments","review_comment_url":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UKITH/Arabs-Startups/issues/107/comments","statuses_url":"https://api.github.com/repos/UKITH/Arabs-Startups/statuses/1af3004e2bf9da80439bc3b707276d214d8440ee","head":{"label":"UKITH:allEventsFunctionality","ref":"allEventsFunctionality","sha":"1af3004e2bf9da80439bc3b707276d214d8440ee","user":{"login":"UKITH","id":29693340,"avatar_url":"https://avatars2.githubusercontent.com/u/29693340?v=4","gravatar_id":"","url":"https://api.github.com/users/UKITH","html_url":"https://github.com/UKITH","followers_url":"https://api.github.com/users/UKITH/followers","following_url":"https://api.github.com/users/UKITH/following{/other_user}","gists_url":"https://api.github.com/users/UKITH/gists{/gist_id}","starred_url":"https://api.github.com/users/UKITH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKITH/subscriptions","organizations_url":"https://api.github.com/users/UKITH/orgs","repos_url":"https://api.github.com/users/UKITH/repos","events_url":"https://api.github.com/users/UKITH/events{/privacy}","received_events_url":"https://api.github.com/users/UKITH/received_events","type":"Organization","site_admin":false},"repo":{"id":95379037,"name":"Arabs-Startups","full_name":"UKITH/Arabs-Startups","owner":{"login":"UKITH","id":29693340,"avatar_url":"https://avatars2.githubusercontent.com/u/29693340?v=4","gravatar_id":"","url":"https://api.github.com/users/UKITH","html_url":"https://github.com/UKITH","followers_url":"https://api.github.com/users/UKITH/followers","following_url":"https://api.github.com/users/UKITH/following{/other_user}","gists_url":"https://api.github.com/users/UKITH/gists{/gist_id}","starred_url":"https://api.github.com/users/UKITH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKITH/subscriptions","organizations_url":"https://api.github.com/users/UKITH/orgs","repos_url":"https://api.github.com/users/UKITH/repos","events_url":"https://api.github.com/users/UKITH/events{/privacy}","received_events_url":"https://api.github.com/users/UKITH/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UKITH/Arabs-Startups","description":"A web application to make Arabs startups more accessible for Investors and to enhance interest in the Arab Hi-tech scene.","fork":false,"url":"https://api.github.com/repos/UKITH/Arabs-Startups","forks_url":"https://api.github.com/repos/UKITH/Arabs-Startups/forks","keys_url":"https://api.github.com/repos/UKITH/Arabs-Startups/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UKITH/Arabs-Startups/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UKITH/Arabs-Startups/teams","hooks_url":"https://api.github.com/repos/UKITH/Arabs-Startups/hooks","issue_events_url":"https://api.github.com/repos/UKITH/Arabs-Startups/issues/events{/number}","events_url":"https://api.github.com/repos/UKITH/Arabs-Startups/events","assignees_url":"https://api.github.com/repos/UKITH/Arabs-Startups/assignees{/user}","branches_url":"https://api.github.com/repos/UKITH/Arabs-Startups/branches{/branch}","tags_url":"https://api.github.com/repos/UKITH/Arabs-Startups/tags","blobs_url":"https://api.github.com/repos/UKITH/Arabs-Startups/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UKITH/Arabs-Startups/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UKITH/Arabs-Startups/git/refs{/sha}","trees_url":"https://api.github.com/repos/UKITH/Arabs-Startups/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UKITH/Arabs-Startups/statuses/{sha}","languages_url":"https://api.github.com/repos/UKITH/Arabs-Startups/languages","stargazers_url":"https://api.github.com/repos/UKITH/Arabs-Startups/stargazers","contributors_url":"https://api.github.com/repos/UKITH/Arabs-Startups/contributors","subscribers_url":"https://api.github.com/repos/UKITH/Arabs-Startups/subscribers","subscription_url":"https://api.github.com/repos/UKITH/Arabs-Startups/subscription","commits_url":"https://api.github.com/repos/UKITH/Arabs-Startups/commits{/sha}","git_commits_url":"https://api.github.com/repos/UKITH/Arabs-Startups/git/commits{/sha}","comments_url":"https://api.github.com/repos/UKITH/Arabs-Startups/comments{/number}","issue_comment_url":"https://api.github.com/repos/UKITH/Arabs-Startups/issues/comments{/number}","contents_url":"https://api.github.com/repos/UKITH/Arabs-Startups/contents/{+path}","compare_url":"https://api.github.com/repos/UKITH/Arabs-Startups/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UKITH/Arabs-Startups/merges","archive_url":"https://api.github.com/repos/UKITH/Arabs-Startups/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UKITH/Arabs-Startups/downloads","issues_url":"https://api.github.com/repos/UKITH/Arabs-Startups/issues{/number}","pulls_url":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls{/number}","milestones_url":"https://api.github.com/repos/UKITH/Arabs-Startups/milestones{/number}","notifications_url":"https://api.github.com/repos/UKITH/Arabs-Startups/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UKITH/Arabs-Startups/labels{/name}","releases_url":"https://api.github.com/repos/UKITH/Arabs-Startups/releases{/id}","deployments_url":"https://api.github.com/repos/UKITH/Arabs-Startups/deployments","created_at":"2017-06-25T18:44:28Z","updated_at":"2017-07-31T06:37:26Z","pushed_at":"2017-07-31T18:12:24Z","git_url":"git://github.com/UKITH/Arabs-Startups.git","ssh_url":"git@github.com:UKITH/Arabs-Startups.git","clone_url":"https://github.com/UKITH/Arabs-Startups.git","svn_url":"https://github.com/UKITH/Arabs-Startups","homepage":null,"size":3010,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":28,"forks":0,"open_issues":28,"watchers":2,"default_branch":"master"}},"base":{"label":"UKITH:master","ref":"master","sha":"4b678dfbdb11fb6615b80dd5f1d1299fad8ba230","user":{"login":"UKITH","id":29693340,"avatar_url":"https://avatars2.githubusercontent.com/u/29693340?v=4","gravatar_id":"","url":"https://api.github.com/users/UKITH","html_url":"https://github.com/UKITH","followers_url":"https://api.github.com/users/UKITH/followers","following_url":"https://api.github.com/users/UKITH/following{/other_user}","gists_url":"https://api.github.com/users/UKITH/gists{/gist_id}","starred_url":"https://api.github.com/users/UKITH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKITH/subscriptions","organizations_url":"https://api.github.com/users/UKITH/orgs","repos_url":"https://api.github.com/users/UKITH/repos","events_url":"https://api.github.com/users/UKITH/events{/privacy}","received_events_url":"https://api.github.com/users/UKITH/received_events","type":"Organization","site_admin":false},"repo":{"id":95379037,"name":"Arabs-Startups","full_name":"UKITH/Arabs-Startups","owner":{"login":"UKITH","id":29693340,"avatar_url":"https://avatars2.githubusercontent.com/u/29693340?v=4","gravatar_id":"","url":"https://api.github.com/users/UKITH","html_url":"https://github.com/UKITH","followers_url":"https://api.github.com/users/UKITH/followers","following_url":"https://api.github.com/users/UKITH/following{/other_user}","gists_url":"https://api.github.com/users/UKITH/gists{/gist_id}","starred_url":"https://api.github.com/users/UKITH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKITH/subscriptions","organizations_url":"https://api.github.com/users/UKITH/orgs","repos_url":"https://api.github.com/users/UKITH/repos","events_url":"https://api.github.com/users/UKITH/events{/privacy}","received_events_url":"https://api.github.com/users/UKITH/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UKITH/Arabs-Startups","description":"A web application to make Arabs startups more accessible for Investors and to enhance interest in the Arab Hi-tech scene.","fork":false,"url":"https://api.github.com/repos/UKITH/Arabs-Startups","forks_url":"https://api.github.com/repos/UKITH/Arabs-Startups/forks","keys_url":"https://api.github.com/repos/UKITH/Arabs-Startups/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UKITH/Arabs-Startups/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UKITH/Arabs-Startups/teams","hooks_url":"https://api.github.com/repos/UKITH/Arabs-Startups/hooks","issue_events_url":"https://api.github.com/repos/UKITH/Arabs-Startups/issues/events{/number}","events_url":"https://api.github.com/repos/UKITH/Arabs-Startups/events","assignees_url":"https://api.github.com/repos/UKITH/Arabs-Startups/assignees{/user}","branches_url":"https://api.github.com/repos/UKITH/Arabs-Startups/branches{/branch}","tags_url":"https://api.github.com/repos/UKITH/Arabs-Startups/tags","blobs_url":"https://api.github.com/repos/UKITH/Arabs-Startups/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UKITH/Arabs-Startups/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UKITH/Arabs-Startups/git/refs{/sha}","trees_url":"https://api.github.com/repos/UKITH/Arabs-Startups/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UKITH/Arabs-Startups/statuses/{sha}","languages_url":"https://api.github.com/repos/UKITH/Arabs-Startups/languages","stargazers_url":"https://api.github.com/repos/UKITH/Arabs-Startups/stargazers","contributors_url":"https://api.github.com/repos/UKITH/Arabs-Startups/contributors","subscribers_url":"https://api.github.com/repos/UKITH/Arabs-Startups/subscribers","subscription_url":"https://api.github.com/repos/UKITH/Arabs-Startups/subscription","commits_url":"https://api.github.com/repos/UKITH/Arabs-Startups/commits{/sha}","git_commits_url":"https://api.github.com/repos/UKITH/Arabs-Startups/git/commits{/sha}","comments_url":"https://api.github.com/repos/UKITH/Arabs-Startups/comments{/number}","issue_comment_url":"https://api.github.com/repos/UKITH/Arabs-Startups/issues/comments{/number}","contents_url":"https://api.github.com/repos/UKITH/Arabs-Startups/contents/{+path}","compare_url":"https://api.github.com/repos/UKITH/Arabs-Startups/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UKITH/Arabs-Startups/merges","archive_url":"https://api.github.com/repos/UKITH/Arabs-Startups/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UKITH/Arabs-Startups/downloads","issues_url":"https://api.github.com/repos/UKITH/Arabs-Startups/issues{/number}","pulls_url":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls{/number}","milestones_url":"https://api.github.com/repos/UKITH/Arabs-Startups/milestones{/number}","notifications_url":"https://api.github.com/repos/UKITH/Arabs-Startups/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UKITH/Arabs-Startups/labels{/name}","releases_url":"https://api.github.com/repos/UKITH/Arabs-Startups/releases{/id}","deployments_url":"https://api.github.com/repos/UKITH/Arabs-Startups/deployments","created_at":"2017-06-25T18:44:28Z","updated_at":"2017-07-31T06:37:26Z","pushed_at":"2017-07-31T18:12:24Z","git_url":"git://github.com/UKITH/Arabs-Startups.git","ssh_url":"git@github.com:UKITH/Arabs-Startups.git","clone_url":"https://github.com/UKITH/Arabs-Startups.git","svn_url":"https://github.com/UKITH/Arabs-Startups","homepage":null,"size":3010,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":28,"forks":0,"open_issues":28,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls/107"},"html":{"href":"https://github.com/UKITH/Arabs-Startups/pull/107"},"issue":{"href":"https://api.github.com/repos/UKITH/Arabs-Startups/issues/107"},"comments":{"href":"https://api.github.com/repos/UKITH/Arabs-Startups/issues/107/comments"},"review_comments":{"href":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls/107/comments"},"review_comment":{"href":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UKITH/Arabs-Startups/pulls/107/commits"},"statuses":{"href":"https://api.github.com/repos/UKITH/Arabs-Startups/statuses/1af3004e2bf9da80439bc3b707276d214d8440ee"}}}}
{"actor":{"display_login":"Suuuuha"}}