{"action":"created","comment":{"url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/comments/28627660","id":28627660,"diff_hunk":"@@ -1,5 +1,94 @@\n /* \n  * add your module definition for enhancedDate here\n  * assign the module to a global variable\n- * /\n+ */\n+\n+var enhancedDate = (function enhancedDate() {\n+\n+    'use strict';\n+ \t\t \n+\tvar date = null;\n+\tvar isDateSet = false;\n+\tvar days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', \n+\t\t\t'Friday', 'Saturday'];\n+\tvar months = ['Januray', 'February', 'March', 'April', 'May', 'June',\n+\t\t\t'July', 'August', 'September', 'November', 'December'];\n+\n+    var publicAPI = {\n+\n+    \tsetDate: function setDate(myDate) {\n+\n+    \t\tif (myDate == \"Invalid Date\") {\n+    \t\t\talert(\"The date you've entered is invalid.\");\n+    \t\t} else if (myDate instanceof Date) {\n+\t\t\t\tdate = myDate;","path":"app/js/enhancedDate.js","position":25,"original_position":25,"commit_id":"da7ec51179cf583695d6b169194da9deb5a87dc7","original_commit_id":"da7ec51179cf583695d6b169194da9deb5a87dc7","user":{"login":"jamdon","id":10747092,"avatar_url":"https://avatars.githubusercontent.com/u/10747092?v=3","gravatar_id":"","url":"https://api.github.com/users/jamdon","html_url":"https://github.com/jamdon","followers_url":"https://api.github.com/users/jamdon/followers","following_url":"https://api.github.com/users/jamdon/following{/other_user}","gists_url":"https://api.github.com/users/jamdon/gists{/gist_id}","starred_url":"https://api.github.com/users/jamdon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamdon/subscriptions","organizations_url":"https://api.github.com/users/jamdon/orgs","repos_url":"https://api.github.com/users/jamdon/repos","events_url":"https://api.github.com/users/jamdon/events{/privacy}","received_events_url":"https://api.github.com/users/jamdon/received_events","type":"User","site_admin":false},"body":"This works, but keep in mind that objects are pass by reference when used as arguments in JavaScript. This means that if the object that was passed in is modified outside the module, it will update the reference you're storing internally. Instead, just instantiate a new Date reference by passing in the date the user passed in: `date = new Date(myDate);`","created_at":"2015-04-17T20:30:45Z","updated_at":"2015-04-17T20:30:45Z","html_url":"https://github.com/JSCRIPT300-Spring2015/Module_2/pull/13#discussion_r28627660","pull_request_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/comments/28627660"},"html":{"href":"https://github.com/JSCRIPT300-Spring2015/Module_2/pull/13#discussion_r28627660"},"pull_request":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/13","id":33506126,"html_url":"https://github.com/JSCRIPT300-Spring2015/Module_2/pull/13","diff_url":"https://github.com/JSCRIPT300-Spring2015/Module_2/pull/13.diff","patch_url":"https://github.com/JSCRIPT300-Spring2015/Module_2/pull/13.patch","issue_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/issues/13","number":13,"state":"open","locked":false,"title":"Eddie Lee - Module 2","user":{"login":"patternchef","id":1952676,"avatar_url":"https://avatars.githubusercontent.com/u/1952676?v=3","gravatar_id":"","url":"https://api.github.com/users/patternchef","html_url":"https://github.com/patternchef","followers_url":"https://api.github.com/users/patternchef/followers","following_url":"https://api.github.com/users/patternchef/following{/other_user}","gists_url":"https://api.github.com/users/patternchef/gists{/gist_id}","starred_url":"https://api.github.com/users/patternchef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patternchef/subscriptions","organizations_url":"https://api.github.com/users/patternchef/orgs","repos_url":"https://api.github.com/users/patternchef/repos","events_url":"https://api.github.com/users/patternchef/events{/privacy}","received_events_url":"https://api.github.com/users/patternchef/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-17T00:41:12Z","updated_at":"2015-04-17T20:30:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"998052ff63df151b3b50849d072528fe57e455fc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/13/commits","review_comments_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/13/comments","review_comment_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/issues/13/comments","statuses_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/statuses/da7ec51179cf583695d6b169194da9deb5a87dc7","head":{"label":"patternchef:master","ref":"master","sha":"da7ec51179cf583695d6b169194da9deb5a87dc7","user":{"login":"patternchef","id":1952676,"avatar_url":"https://avatars.githubusercontent.com/u/1952676?v=3","gravatar_id":"","url":"https://api.github.com/users/patternchef","html_url":"https://github.com/patternchef","followers_url":"https://api.github.com/users/patternchef/followers","following_url":"https://api.github.com/users/patternchef/following{/other_user}","gists_url":"https://api.github.com/users/patternchef/gists{/gist_id}","starred_url":"https://api.github.com/users/patternchef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patternchef/subscriptions","organizations_url":"https://api.github.com/users/patternchef/orgs","repos_url":"https://api.github.com/users/patternchef/repos","events_url":"https://api.github.com/users/patternchef/events{/privacy}","received_events_url":"https://api.github.com/users/patternchef/received_events","type":"User","site_admin":false},"repo":{"id":33874466,"name":"Module_2","full_name":"patternchef/Module_2","owner":{"login":"patternchef","id":1952676,"avatar_url":"https://avatars.githubusercontent.com/u/1952676?v=3","gravatar_id":"","url":"https://api.github.com/users/patternchef","html_url":"https://github.com/patternchef","followers_url":"https://api.github.com/users/patternchef/followers","following_url":"https://api.github.com/users/patternchef/following{/other_user}","gists_url":"https://api.github.com/users/patternchef/gists{/gist_id}","starred_url":"https://api.github.com/users/patternchef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patternchef/subscriptions","organizations_url":"https://api.github.com/users/patternchef/orgs","repos_url":"https://api.github.com/users/patternchef/repos","events_url":"https://api.github.com/users/patternchef/events{/privacy}","received_events_url":"https://api.github.com/users/patternchef/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/patternchef/Module_2","description":"","fork":true,"url":"https://api.github.com/repos/patternchef/Module_2","forks_url":"https://api.github.com/repos/patternchef/Module_2/forks","keys_url":"https://api.github.com/repos/patternchef/Module_2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/patternchef/Module_2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/patternchef/Module_2/teams","hooks_url":"https://api.github.com/repos/patternchef/Module_2/hooks","issue_events_url":"https://api.github.com/repos/patternchef/Module_2/issues/events{/number}","events_url":"https://api.github.com/repos/patternchef/Module_2/events","assignees_url":"https://api.github.com/repos/patternchef/Module_2/assignees{/user}","branches_url":"https://api.github.com/repos/patternchef/Module_2/branches{/branch}","tags_url":"https://api.github.com/repos/patternchef/Module_2/tags","blobs_url":"https://api.github.com/repos/patternchef/Module_2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/patternchef/Module_2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/patternchef/Module_2/git/refs{/sha}","trees_url":"https://api.github.com/repos/patternchef/Module_2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/patternchef/Module_2/statuses/{sha}","languages_url":"https://api.github.com/repos/patternchef/Module_2/languages","stargazers_url":"https://api.github.com/repos/patternchef/Module_2/stargazers","contributors_url":"https://api.github.com/repos/patternchef/Module_2/contributors","subscribers_url":"https://api.github.com/repos/patternchef/Module_2/subscribers","subscription_url":"https://api.github.com/repos/patternchef/Module_2/subscription","commits_url":"https://api.github.com/repos/patternchef/Module_2/commits{/sha}","git_commits_url":"https://api.github.com/repos/patternchef/Module_2/git/commits{/sha}","comments_url":"https://api.github.com/repos/patternchef/Module_2/comments{/number}","issue_comment_url":"https://api.github.com/repos/patternchef/Module_2/issues/comments{/number}","contents_url":"https://api.github.com/repos/patternchef/Module_2/contents/{+path}","compare_url":"https://api.github.com/repos/patternchef/Module_2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/patternchef/Module_2/merges","archive_url":"https://api.github.com/repos/patternchef/Module_2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/patternchef/Module_2/downloads","issues_url":"https://api.github.com/repos/patternchef/Module_2/issues{/number}","pulls_url":"https://api.github.com/repos/patternchef/Module_2/pulls{/number}","milestones_url":"https://api.github.com/repos/patternchef/Module_2/milestones{/number}","notifications_url":"https://api.github.com/repos/patternchef/Module_2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/patternchef/Module_2/labels{/name}","releases_url":"https://api.github.com/repos/patternchef/Module_2/releases{/id}","created_at":"2015-04-13T14:49:38Z","updated_at":"2015-04-17T00:37:20Z","pushed_at":"2015-04-17T00:37:20Z","git_url":"git://github.com/patternchef/Module_2.git","ssh_url":"git@github.com:patternchef/Module_2.git","clone_url":"https://github.com/patternchef/Module_2.git","svn_url":"https://github.com/patternchef/Module_2","homepage":null,"size":61,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JSCRIPT300-Spring2015:master","ref":"master","sha":"def039db8603cc821024b6a89c559fe9a9eeb0a7","user":{"login":"JSCRIPT300-Spring2015","id":11728112,"avatar_url":"https://avatars.githubusercontent.com/u/11728112?v=3","gravatar_id":"","url":"https://api.github.com/users/JSCRIPT300-Spring2015","html_url":"https://github.com/JSCRIPT300-Spring2015","followers_url":"https://api.github.com/users/JSCRIPT300-Spring2015/followers","following_url":"https://api.github.com/users/JSCRIPT300-Spring2015/following{/other_user}","gists_url":"https://api.github.com/users/JSCRIPT300-Spring2015/gists{/gist_id}","starred_url":"https://api.github.com/users/JSCRIPT300-Spring2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSCRIPT300-Spring2015/subscriptions","organizations_url":"https://api.github.com/users/JSCRIPT300-Spring2015/orgs","repos_url":"https://api.github.com/users/JSCRIPT300-Spring2015/repos","events_url":"https://api.github.com/users/JSCRIPT300-Spring2015/events{/privacy}","received_events_url":"https://api.github.com/users/JSCRIPT300-Spring2015/received_events","type":"Organization","site_admin":false},"repo":{"id":33549789,"name":"Module_2","full_name":"JSCRIPT300-Spring2015/Module_2","owner":{"login":"JSCRIPT300-Spring2015","id":11728112,"avatar_url":"https://avatars.githubusercontent.com/u/11728112?v=3","gravatar_id":"","url":"https://api.github.com/users/JSCRIPT300-Spring2015","html_url":"https://github.com/JSCRIPT300-Spring2015","followers_url":"https://api.github.com/users/JSCRIPT300-Spring2015/followers","following_url":"https://api.github.com/users/JSCRIPT300-Spring2015/following{/other_user}","gists_url":"https://api.github.com/users/JSCRIPT300-Spring2015/gists{/gist_id}","starred_url":"https://api.github.com/users/JSCRIPT300-Spring2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSCRIPT300-Spring2015/subscriptions","organizations_url":"https://api.github.com/users/JSCRIPT300-Spring2015/orgs","repos_url":"https://api.github.com/users/JSCRIPT300-Spring2015/repos","events_url":"https://api.github.com/users/JSCRIPT300-Spring2015/events{/privacy}","received_events_url":"https://api.github.com/users/JSCRIPT300-Spring2015/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JSCRIPT300-Spring2015/Module_2","description":"","fork":false,"url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2","forks_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/forks","keys_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/teams","hooks_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/hooks","issue_events_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/issues/events{/number}","events_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/events","assignees_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/assignees{/user}","branches_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/branches{/branch}","tags_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/tags","blobs_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/git/refs{/sha}","trees_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/statuses/{sha}","languages_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/languages","stargazers_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/stargazers","contributors_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/contributors","subscribers_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/subscribers","subscription_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/subscription","commits_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/commits{/sha}","git_commits_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/git/commits{/sha}","comments_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/comments{/number}","issue_comment_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/issues/comments{/number}","contents_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/contents/{+path}","compare_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/merges","archive_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/downloads","issues_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/issues{/number}","pulls_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls{/number}","milestones_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/milestones{/number}","notifications_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/labels{/name}","releases_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/releases{/id}","created_at":"2015-04-07T14:56:31Z","updated_at":"2015-04-13T14:33:48Z","pushed_at":"2015-04-17T19:40:45Z","git_url":"git://github.com/JSCRIPT300-Spring2015/Module_2.git","ssh_url":"git@github.com:JSCRIPT300-Spring2015/Module_2.git","clone_url":"https://github.com/JSCRIPT300-Spring2015/Module_2.git","svn_url":"https://github.com/JSCRIPT300-Spring2015/Module_2","homepage":null,"size":273,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":3,"forks":22,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/13"},"html":{"href":"https://github.com/JSCRIPT300-Spring2015/Module_2/pull/13"},"issue":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/issues/13"},"comments":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/statuses/da7ec51179cf583695d6b169194da9deb5a87dc7"}}}}