{"action":"created","comment":{"url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/comments/28847711","id":28847711,"diff_hunk":"@@ -1,5 +1,156 @@\n-/* \n- * add your module definition for enhancedDate here\n- * assign the module to a global variable\n- * /\n+var enhancedDate = (function (date) {\n+// still maintains access to all globals\n+  \n+  var dateMethods = {};\n+  var myDate = date;\n+  var dateString = Date(year, month, day, hours, minutes, seconds, milliseconds);\n+  var newDate = new Date();\n+  var epochDate = newDate.getTime();\n+  \n+//Stores the passed-in date.  \n+  dateMethods.checkDate = function () {\n+      \n+//Do some type-checking to make sure you have a valid type. \n+//Takes milliseconds after epoch or a date object. \n+//Do some type-checking to make sure you have a valid type.\n+    \n+      if (date){\n+        if(myDate instanceof Date)\n+        {\n+        return true;\n+        \n+        } else if (typeof myDate === 'number' && (myDate > 0 && myDate <= epochDate))\n+        {\n+        return true;\n+        \n+        } else {\n+        return false;  \n+        } \n+      }\n+\n+//If no value is passed, default to now.   \n+      else {\n+        myDate = newDate;\n+        return true;\n+      }\n+  };\n+\n+\n+//Returns either milliseconds after epoch by default or a date object if true is passed as an argument.            \n+  dateMethods.getDate = function (){\n+    dateMethods.checkDate();\n+    \n+    if (dateMethods.checkDate === true) {","path":"app/js/enhancedDate.js","position":47,"original_position":47,"commit_id":"d553c947247b17fe7eb2e00c67cbdb5e2cbe8e31","original_commit_id":"d553c947247b17fe7eb2e00c67cbdb5e2cbe8e31","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":"your checkDate is a function, so comparing it to true will always be false","created_at":"2015-04-22T06:32:16Z","updated_at":"2015-04-22T06:32:16Z","html_url":"https://github.com/JSCRIPT300-Spring2015/Module_2/pull/19#discussion_r28847711","pull_request_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/comments/28847711"},"html":{"href":"https://github.com/JSCRIPT300-Spring2015/Module_2/pull/19#discussion_r28847711"},"pull_request":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/19","id":33811563,"html_url":"https://github.com/JSCRIPT300-Spring2015/Module_2/pull/19","diff_url":"https://github.com/JSCRIPT300-Spring2015/Module_2/pull/19.diff","patch_url":"https://github.com/JSCRIPT300-Spring2015/Module_2/pull/19.patch","issue_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/issues/19","number":19,"state":"open","locked":false,"title":"Tyler Waite's updated Module 2 enhanced Date code.","user":{"login":"tylerw8","id":9169939,"avatar_url":"https://avatars.githubusercontent.com/u/9169939?v=3","gravatar_id":"","url":"https://api.github.com/users/tylerw8","html_url":"https://github.com/tylerw8","followers_url":"https://api.github.com/users/tylerw8/followers","following_url":"https://api.github.com/users/tylerw8/following{/other_user}","gists_url":"https://api.github.com/users/tylerw8/gists{/gist_id}","starred_url":"https://api.github.com/users/tylerw8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylerw8/subscriptions","organizations_url":"https://api.github.com/users/tylerw8/orgs","repos_url":"https://api.github.com/users/tylerw8/repos","events_url":"https://api.github.com/users/tylerw8/events{/privacy}","received_events_url":"https://api.github.com/users/tylerw8/received_events","type":"User","site_admin":false},"body":"I went through my code and made updates based on your comments and checked it in JS hint.  ","created_at":"2015-04-21T22:52:00Z","updated_at":"2015-04-22T06:32:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba6a7bccb569e298a10d96d184c865e42f0a64ef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/19/commits","review_comments_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/19/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/19/comments","statuses_url":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/statuses/d553c947247b17fe7eb2e00c67cbdb5e2cbe8e31","head":{"label":"tylerw8:master","ref":"master","sha":"d553c947247b17fe7eb2e00c67cbdb5e2cbe8e31","user":{"login":"tylerw8","id":9169939,"avatar_url":"https://avatars.githubusercontent.com/u/9169939?v=3","gravatar_id":"","url":"https://api.github.com/users/tylerw8","html_url":"https://github.com/tylerw8","followers_url":"https://api.github.com/users/tylerw8/followers","following_url":"https://api.github.com/users/tylerw8/following{/other_user}","gists_url":"https://api.github.com/users/tylerw8/gists{/gist_id}","starred_url":"https://api.github.com/users/tylerw8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylerw8/subscriptions","organizations_url":"https://api.github.com/users/tylerw8/orgs","repos_url":"https://api.github.com/users/tylerw8/repos","events_url":"https://api.github.com/users/tylerw8/events{/privacy}","received_events_url":"https://api.github.com/users/tylerw8/received_events","type":"User","site_admin":false},"repo":{"id":33833379,"name":"Module_2","full_name":"tylerw8/Module_2","owner":{"login":"tylerw8","id":9169939,"avatar_url":"https://avatars.githubusercontent.com/u/9169939?v=3","gravatar_id":"","url":"https://api.github.com/users/tylerw8","html_url":"https://github.com/tylerw8","followers_url":"https://api.github.com/users/tylerw8/followers","following_url":"https://api.github.com/users/tylerw8/following{/other_user}","gists_url":"https://api.github.com/users/tylerw8/gists{/gist_id}","starred_url":"https://api.github.com/users/tylerw8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylerw8/subscriptions","organizations_url":"https://api.github.com/users/tylerw8/orgs","repos_url":"https://api.github.com/users/tylerw8/repos","events_url":"https://api.github.com/users/tylerw8/events{/privacy}","received_events_url":"https://api.github.com/users/tylerw8/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tylerw8/Module_2","description":"","fork":true,"url":"https://api.github.com/repos/tylerw8/Module_2","forks_url":"https://api.github.com/repos/tylerw8/Module_2/forks","keys_url":"https://api.github.com/repos/tylerw8/Module_2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tylerw8/Module_2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tylerw8/Module_2/teams","hooks_url":"https://api.github.com/repos/tylerw8/Module_2/hooks","issue_events_url":"https://api.github.com/repos/tylerw8/Module_2/issues/events{/number}","events_url":"https://api.github.com/repos/tylerw8/Module_2/events","assignees_url":"https://api.github.com/repos/tylerw8/Module_2/assignees{/user}","branches_url":"https://api.github.com/repos/tylerw8/Module_2/branches{/branch}","tags_url":"https://api.github.com/repos/tylerw8/Module_2/tags","blobs_url":"https://api.github.com/repos/tylerw8/Module_2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tylerw8/Module_2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tylerw8/Module_2/git/refs{/sha}","trees_url":"https://api.github.com/repos/tylerw8/Module_2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tylerw8/Module_2/statuses/{sha}","languages_url":"https://api.github.com/repos/tylerw8/Module_2/languages","stargazers_url":"https://api.github.com/repos/tylerw8/Module_2/stargazers","contributors_url":"https://api.github.com/repos/tylerw8/Module_2/contributors","subscribers_url":"https://api.github.com/repos/tylerw8/Module_2/subscribers","subscription_url":"https://api.github.com/repos/tylerw8/Module_2/subscription","commits_url":"https://api.github.com/repos/tylerw8/Module_2/commits{/sha}","git_commits_url":"https://api.github.com/repos/tylerw8/Module_2/git/commits{/sha}","comments_url":"https://api.github.com/repos/tylerw8/Module_2/comments{/number}","issue_comment_url":"https://api.github.com/repos/tylerw8/Module_2/issues/comments{/number}","contents_url":"https://api.github.com/repos/tylerw8/Module_2/contents/{+path}","compare_url":"https://api.github.com/repos/tylerw8/Module_2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tylerw8/Module_2/merges","archive_url":"https://api.github.com/repos/tylerw8/Module_2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tylerw8/Module_2/downloads","issues_url":"https://api.github.com/repos/tylerw8/Module_2/issues{/number}","pulls_url":"https://api.github.com/repos/tylerw8/Module_2/pulls{/number}","milestones_url":"https://api.github.com/repos/tylerw8/Module_2/milestones{/number}","notifications_url":"https://api.github.com/repos/tylerw8/Module_2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tylerw8/Module_2/labels{/name}","releases_url":"https://api.github.com/repos/tylerw8/Module_2/releases{/id}","created_at":"2015-04-12T20:48:17Z","updated_at":"2015-04-21T22:50:33Z","pushed_at":"2015-04-21T22:50:33Z","git_url":"git://github.com/tylerw8/Module_2.git","ssh_url":"git@github.com:tylerw8/Module_2.git","clone_url":"https://github.com/tylerw8/Module_2.git","svn_url":"https://github.com/tylerw8/Module_2","homepage":null,"size":84,"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-21T22:52:00Z","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":1268,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":2,"forks":25,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/19"},"html":{"href":"https://github.com/JSCRIPT300-Spring2015/Module_2/pull/19"},"issue":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/issues/19"},"comments":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/pulls/19/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/19/commits"},"statuses":{"href":"https://api.github.com/repos/JSCRIPT300-Spring2015/Module_2/statuses/d553c947247b17fe7eb2e00c67cbdb5e2cbe8e31"}}}}