{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/testdaybot/pulls/comments/25766489","id":25766489,"diff_hunk":"@@ -402,22 +402,32 @@ client.addListener('pm', function(from, message) { // private messages to bot\n           client.say(from, \"Test Day in progress and scheduled to end \" + testDay.end);\n         } else {\n           if (cmdLen >= 5) {\n-            testDay.start = new Date(command[1]);\n-            testDay.end = new Date(command[2]);\n-            testDay.etherpad = command[3];\n-            testDay.topic = command.slice(4, cmdLen).join(\" \");\n-            // if the start and end dates appear valid, set the test date\n-            if ((testDay.end > testDay.start) && (testDay.start > Date.now())) {\n+            var startTime, endTime, dateErrors = [];\n+            startTime = new Date(command[1]);\n+            endTime = new Date(command[2]);\n+            if (endTime < startTime) {\n+              dateErrors.push(\"start time is set after End time\");\n+            }\n+            if (startTime < Date.now()) {\n+              dateErrors.push(\"start time is set in the past\");\n+            }\n+            // if the start and end dates appear valid, set the test day date\n+            if (dateErrors.length == 0) {\n               if (timerID !== 0) {\n                 clearTimeout(timerID);\n               }\n+              testDay.start = startTime;\n+              testDay.end = endTime;\n+              testDay.etherpad = command[3];\n+              testDay.topic = command.slice(4, cmdLen).join(\" \");\n               timerID = setTimeout(updateTestDayData, testDay.start - Date.now());\n               client.say(from, \"Next Test Day's start is \" + testDay.start.toUTCString());\n               client.say(from, \"Next Test Day's end is \" + testDay.end.toUTCString());\n               client.say(from, \"Next Test Day's etherpad is \" + testDay.etherpad);\n               client.say(from, \"Next Test Day's topic is \" + testDay.topic);\n-            } else {\n-              client.say(from, \"Please use valid dates.\");\n+            }\n+            else {\n+              client.say(from, \"Please use valid dates: \" + dateErrors.join(\", \") + \".\");","path":"bot.js","position":37,"original_position":37,"commit_id":"0f55f87f379aff8549ab6bf23245ddb59729ec5c","original_commit_id":"0f55f87f379aff8549ab6bf23245ddb59729ec5c","user":{"login":"whimboo","id":129603,"avatar_url":"https://avatars.githubusercontent.com/u/129603?v=3","gravatar_id":"","url":"https://api.github.com/users/whimboo","html_url":"https://github.com/whimboo","followers_url":"https://api.github.com/users/whimboo/followers","following_url":"https://api.github.com/users/whimboo/following{/other_user}","gists_url":"https://api.github.com/users/whimboo/gists{/gist_id}","starred_url":"https://api.github.com/users/whimboo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whimboo/subscriptions","organizations_url":"https://api.github.com/users/whimboo/orgs","repos_url":"https://api.github.com/users/whimboo/repos","events_url":"https://api.github.com/users/whimboo/events{/privacy}","received_events_url":"https://api.github.com/users/whimboo/received_events","type":"User","site_admin":false},"body":"I would suggest to print each failure in its own line, which makes it easier to read.","created_at":"2015-03-04T10:59:47Z","updated_at":"2015-03-04T10:59:47Z","html_url":"https://github.com/mozilla/testdaybot/pull/77#discussion_r25766489","pull_request_url":"https://api.github.com/repos/mozilla/testdaybot/pulls/77","_links":{"self":{"href":"https://api.github.com/repos/mozilla/testdaybot/pulls/comments/25766489"},"html":{"href":"https://github.com/mozilla/testdaybot/pull/77#discussion_r25766489"},"pull_request":{"href":"https://api.github.com/repos/mozilla/testdaybot/pulls/77"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/testdaybot/pulls/77","id":29572247,"html_url":"https://github.com/mozilla/testdaybot/pull/77","diff_url":"https://github.com/mozilla/testdaybot/pull/77.diff","patch_url":"https://github.com/mozilla/testdaybot/pull/77.patch","issue_url":"https://api.github.com/repos/mozilla/testdaybot/issues/77","number":77,"state":"open","locked":false,"title":"Make time errors more explicit when setting the \":next\" Testday","user":{"login":"xabolcs","id":568751,"avatar_url":"https://avatars.githubusercontent.com/u/568751?v=3","gravatar_id":"","url":"https://api.github.com/users/xabolcs","html_url":"https://github.com/xabolcs","followers_url":"https://api.github.com/users/xabolcs/followers","following_url":"https://api.github.com/users/xabolcs/following{/other_user}","gists_url":"https://api.github.com/users/xabolcs/gists{/gist_id}","starred_url":"https://api.github.com/users/xabolcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xabolcs/subscriptions","organizations_url":"https://api.github.com/users/xabolcs/orgs","repos_url":"https://api.github.com/users/xabolcs/repos","events_url":"https://api.github.com/users/xabolcs/events{/privacy}","received_events_url":"https://api.github.com/users/xabolcs/received_events","type":"User","site_admin":false},"body":"Fix for #74.","created_at":"2015-02-18T22:59:39Z","updated_at":"2015-03-04T10:59:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a70bc1eb9318460e9e10e11275d770f310593626","assignee":{"login":"xabolcs","id":568751,"avatar_url":"https://avatars.githubusercontent.com/u/568751?v=3","gravatar_id":"","url":"https://api.github.com/users/xabolcs","html_url":"https://github.com/xabolcs","followers_url":"https://api.github.com/users/xabolcs/followers","following_url":"https://api.github.com/users/xabolcs/following{/other_user}","gists_url":"https://api.github.com/users/xabolcs/gists{/gist_id}","starred_url":"https://api.github.com/users/xabolcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xabolcs/subscriptions","organizations_url":"https://api.github.com/users/xabolcs/orgs","repos_url":"https://api.github.com/users/xabolcs/repos","events_url":"https://api.github.com/users/xabolcs/events{/privacy}","received_events_url":"https://api.github.com/users/xabolcs/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/testdaybot/pulls/77/commits","review_comments_url":"https://api.github.com/repos/mozilla/testdaybot/pulls/77/comments","review_comment_url":"https://api.github.com/repos/mozilla/testdaybot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/testdaybot/issues/77/comments","statuses_url":"https://api.github.com/repos/mozilla/testdaybot/statuses/0f55f87f379aff8549ab6bf23245ddb59729ec5c","head":{"label":"xabolcs:branch-issue-74-next-more-explicit-errors","ref":"branch-issue-74-next-more-explicit-errors","sha":"0f55f87f379aff8549ab6bf23245ddb59729ec5c","user":{"login":"xabolcs","id":568751,"avatar_url":"https://avatars.githubusercontent.com/u/568751?v=3","gravatar_id":"","url":"https://api.github.com/users/xabolcs","html_url":"https://github.com/xabolcs","followers_url":"https://api.github.com/users/xabolcs/followers","following_url":"https://api.github.com/users/xabolcs/following{/other_user}","gists_url":"https://api.github.com/users/xabolcs/gists{/gist_id}","starred_url":"https://api.github.com/users/xabolcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xabolcs/subscriptions","organizations_url":"https://api.github.com/users/xabolcs/orgs","repos_url":"https://api.github.com/users/xabolcs/repos","events_url":"https://api.github.com/users/xabolcs/events{/privacy}","received_events_url":"https://api.github.com/users/xabolcs/received_events","type":"User","site_admin":false},"repo":{"id":30981848,"name":"testdaybot","full_name":"xabolcs/testdaybot","owner":{"login":"xabolcs","id":568751,"avatar_url":"https://avatars.githubusercontent.com/u/568751?v=3","gravatar_id":"","url":"https://api.github.com/users/xabolcs","html_url":"https://github.com/xabolcs","followers_url":"https://api.github.com/users/xabolcs/followers","following_url":"https://api.github.com/users/xabolcs/following{/other_user}","gists_url":"https://api.github.com/users/xabolcs/gists{/gist_id}","starred_url":"https://api.github.com/users/xabolcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xabolcs/subscriptions","organizations_url":"https://api.github.com/users/xabolcs/orgs","repos_url":"https://api.github.com/users/xabolcs/repos","events_url":"https://api.github.com/users/xabolcs/events{/privacy}","received_events_url":"https://api.github.com/users/xabolcs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xabolcs/testdaybot","description":"Mozilla QA Test Day IRC Bot","fork":true,"url":"https://api.github.com/repos/xabolcs/testdaybot","forks_url":"https://api.github.com/repos/xabolcs/testdaybot/forks","keys_url":"https://api.github.com/repos/xabolcs/testdaybot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xabolcs/testdaybot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xabolcs/testdaybot/teams","hooks_url":"https://api.github.com/repos/xabolcs/testdaybot/hooks","issue_events_url":"https://api.github.com/repos/xabolcs/testdaybot/issues/events{/number}","events_url":"https://api.github.com/repos/xabolcs/testdaybot/events","assignees_url":"https://api.github.com/repos/xabolcs/testdaybot/assignees{/user}","branches_url":"https://api.github.com/repos/xabolcs/testdaybot/branches{/branch}","tags_url":"https://api.github.com/repos/xabolcs/testdaybot/tags","blobs_url":"https://api.github.com/repos/xabolcs/testdaybot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xabolcs/testdaybot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xabolcs/testdaybot/git/refs{/sha}","trees_url":"https://api.github.com/repos/xabolcs/testdaybot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xabolcs/testdaybot/statuses/{sha}","languages_url":"https://api.github.com/repos/xabolcs/testdaybot/languages","stargazers_url":"https://api.github.com/repos/xabolcs/testdaybot/stargazers","contributors_url":"https://api.github.com/repos/xabolcs/testdaybot/contributors","subscribers_url":"https://api.github.com/repos/xabolcs/testdaybot/subscribers","subscription_url":"https://api.github.com/repos/xabolcs/testdaybot/subscription","commits_url":"https://api.github.com/repos/xabolcs/testdaybot/commits{/sha}","git_commits_url":"https://api.github.com/repos/xabolcs/testdaybot/git/commits{/sha}","comments_url":"https://api.github.com/repos/xabolcs/testdaybot/comments{/number}","issue_comment_url":"https://api.github.com/repos/xabolcs/testdaybot/issues/comments{/number}","contents_url":"https://api.github.com/repos/xabolcs/testdaybot/contents/{+path}","compare_url":"https://api.github.com/repos/xabolcs/testdaybot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xabolcs/testdaybot/merges","archive_url":"https://api.github.com/repos/xabolcs/testdaybot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xabolcs/testdaybot/downloads","issues_url":"https://api.github.com/repos/xabolcs/testdaybot/issues{/number}","pulls_url":"https://api.github.com/repos/xabolcs/testdaybot/pulls{/number}","milestones_url":"https://api.github.com/repos/xabolcs/testdaybot/milestones{/number}","notifications_url":"https://api.github.com/repos/xabolcs/testdaybot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xabolcs/testdaybot/labels{/name}","releases_url":"https://api.github.com/repos/xabolcs/testdaybot/releases{/id}","created_at":"2015-02-18T19:16:16Z","updated_at":"2015-02-18T19:16:16Z","pushed_at":"2015-03-02T22:59:05Z","git_url":"git://github.com/xabolcs/testdaybot.git","ssh_url":"git@github.com:xabolcs/testdaybot.git","clone_url":"https://github.com/xabolcs/testdaybot.git","svn_url":"https://github.com/xabolcs/testdaybot","homepage":"http://oss.automatedtester.co.uk/testdaybot/","size":204,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"7620b713db47438a34ac823b946ff2ac64ad3240","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":2897698,"name":"testdaybot","full_name":"mozilla/testdaybot","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/testdaybot","description":"Mozilla QA Test Day IRC Bot","fork":false,"url":"https://api.github.com/repos/mozilla/testdaybot","forks_url":"https://api.github.com/repos/mozilla/testdaybot/forks","keys_url":"https://api.github.com/repos/mozilla/testdaybot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/testdaybot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/testdaybot/teams","hooks_url":"https://api.github.com/repos/mozilla/testdaybot/hooks","issue_events_url":"https://api.github.com/repos/mozilla/testdaybot/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/testdaybot/events","assignees_url":"https://api.github.com/repos/mozilla/testdaybot/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/testdaybot/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/testdaybot/tags","blobs_url":"https://api.github.com/repos/mozilla/testdaybot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/testdaybot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/testdaybot/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/testdaybot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/testdaybot/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/testdaybot/languages","stargazers_url":"https://api.github.com/repos/mozilla/testdaybot/stargazers","contributors_url":"https://api.github.com/repos/mozilla/testdaybot/contributors","subscribers_url":"https://api.github.com/repos/mozilla/testdaybot/subscribers","subscription_url":"https://api.github.com/repos/mozilla/testdaybot/subscription","commits_url":"https://api.github.com/repos/mozilla/testdaybot/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/testdaybot/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/testdaybot/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/testdaybot/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/testdaybot/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/testdaybot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/testdaybot/merges","archive_url":"https://api.github.com/repos/mozilla/testdaybot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/testdaybot/downloads","issues_url":"https://api.github.com/repos/mozilla/testdaybot/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/testdaybot/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/testdaybot/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/testdaybot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/testdaybot/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/testdaybot/releases{/id}","created_at":"2011-12-02T10:15:56Z","updated_at":"2015-03-04T10:53:18Z","pushed_at":"2015-03-04T10:53:18Z","git_url":"git://github.com/mozilla/testdaybot.git","ssh_url":"git@github.com:mozilla/testdaybot.git","clone_url":"https://github.com/mozilla/testdaybot.git","svn_url":"https://github.com/mozilla/testdaybot","homepage":"http://oss.automatedtester.co.uk/testdaybot/","size":984,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":9,"forks":6,"open_issues":9,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/testdaybot/pulls/77"},"html":{"href":"https://github.com/mozilla/testdaybot/pull/77"},"issue":{"href":"https://api.github.com/repos/mozilla/testdaybot/issues/77"},"comments":{"href":"https://api.github.com/repos/mozilla/testdaybot/issues/77/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/testdaybot/pulls/77/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/testdaybot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/testdaybot/pulls/77/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/testdaybot/statuses/0f55f87f379aff8549ab6bf23245ddb59729ec5c"}}}}