{"action":"created","comment":{"url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls/comments/189468741","pull_request_review_id":121653266,"id":189468741,"diff_hunk":"@@ -16,22 +16,25 @@ var militaryToStandard = function(value) {\n             return value;\n         }\n         else {\n-            if(value.length == 8){ //If value is the expected length for military time then process to standard time.\n-                var hour = value.substring ( 0,2 ); //Extract hour\n-                var minutes = value.substring ( 3,5 ); //Extract minutes\n-                var identifier = 'AM'; //Initialize AM PM identifier\n+            if (value.length == 8) { //If value is the expected length for military time then process to standard time.\n+                value = value.split(':'); // convert to array\n+                // fetch\n+                var hours = Number(value[0]);\n \n-                if(hour == 12){ //If hour is 12 then should set AM PM identifier to PM\n-                    identifier = 'PM';\n+                // calculate\n+                var timeValue;\n+                if (hours > 0 && hours <= 12) { // If hour is less than or equal to 12 then convert to standard 12 hour format\n+                    timeValue= \"\" + hours;\n+                } else if (hours > 12) { //If hour is greater than 12 then convert to standard 12 hour format\n+                    timeValue= \"\" + (hours - 12);\n+                } else if (hours == 0) { //If hour is 0 then set to 12 for standard time 12 AM\n+                    timeValue= \"12\";\n                 }\n-                if(hour == 0){ //If hour is 0 then set to 12 for standard time 12 AM\n-                    hour=12;\n-                }\n-                if(hour > 12){ //If hour is greater than 12 then convert to standard 12 hour format and set the AM PM identifier to PM\n-                    hour = hour - 12;\n-                    identifier='PM';\n-                }\n-                return hour + ':' + minutes + ' ' + identifier; //Return the constructed standard time\n+                \n+                timeValue += (Number(value[1]) < 10) ? \":0\" + Number(value[1]) : \":\" + Number(value[1]);  // get minutes\n+                timeValue += (hours >= 12) ? \" PM\" : \" AM\";  // get AM/PM","path":"main_server/local_server/bmlt.js","position":34,"original_position":34,"commit_id":"02fb3bc52da253b7976067c2246966b149c82704","original_commit_id":"02fb3bc52da253b7976067c2246966b149c82704","user":{"login":"radius314","id":1850811,"avatar_url":"https://avatars2.githubusercontent.com/u/1850811?v=4","gravatar_id":"","url":"https://api.github.com/users/radius314","html_url":"https://github.com/radius314","followers_url":"https://api.github.com/users/radius314/followers","following_url":"https://api.github.com/users/radius314/following{/other_user}","gists_url":"https://api.github.com/users/radius314/gists{/gist_id}","starred_url":"https://api.github.com/users/radius314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radius314/subscriptions","organizations_url":"https://api.github.com/users/radius314/orgs","repos_url":"https://api.github.com/users/radius314/repos","events_url":"https://api.github.com/users/radius314/events{/privacy}","received_events_url":"https://api.github.com/users/radius314/received_events","type":"User","site_admin":false},"body":"Swap line 34 for\r\n\r\n`timeValue += value[1]`","created_at":"2018-05-20T19:54:18Z","updated_at":"2018-05-20T19:54:18Z","html_url":"https://github.com/LittleGreenViper/BMLT-Root-Server/pull/7#discussion_r189468741","pull_request_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls/7","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls/comments/189468741"},"html":{"href":"https://github.com/LittleGreenViper/BMLT-Root-Server/pull/7#discussion_r189468741"},"pull_request":{"href":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls/7","id":186126390,"html_url":"https://github.com/LittleGreenViper/BMLT-Root-Server/pull/7","diff_url":"https://github.com/LittleGreenViper/BMLT-Root-Server/pull/7.diff","patch_url":"https://github.com/LittleGreenViper/BMLT-Root-Server/pull/7.patch","issue_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/issues/7","number":7,"state":"open","locked":false,"title":"fix for leading zeros on bmlt.js","user":{"login":"pjaudiomv","id":34245618,"avatar_url":"https://avatars1.githubusercontent.com/u/34245618?v=4","gravatar_id":"","url":"https://api.github.com/users/pjaudiomv","html_url":"https://github.com/pjaudiomv","followers_url":"https://api.github.com/users/pjaudiomv/followers","following_url":"https://api.github.com/users/pjaudiomv/following{/other_user}","gists_url":"https://api.github.com/users/pjaudiomv/gists{/gist_id}","starred_url":"https://api.github.com/users/pjaudiomv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjaudiomv/subscriptions","organizations_url":"https://api.github.com/users/pjaudiomv/orgs","repos_url":"https://api.github.com/users/pjaudiomv/repos","events_url":"https://api.github.com/users/pjaudiomv/events{/privacy}","received_events_url":"https://api.github.com/users/pjaudiomv/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-04T23:47:24Z","updated_at":"2018-05-20T19:54:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d001439bbf8bdd64cd71b9b74f3d7ca914b430e7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls/7/commits","review_comments_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls/7/comments","review_comment_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/issues/7/comments","statuses_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/statuses/02fb3bc52da253b7976067c2246966b149c82704","head":{"label":"pjaudiomv:master","ref":"master","sha":"02fb3bc52da253b7976067c2246966b149c82704","user":{"login":"pjaudiomv","id":34245618,"avatar_url":"https://avatars1.githubusercontent.com/u/34245618?v=4","gravatar_id":"","url":"https://api.github.com/users/pjaudiomv","html_url":"https://github.com/pjaudiomv","followers_url":"https://api.github.com/users/pjaudiomv/followers","following_url":"https://api.github.com/users/pjaudiomv/following{/other_user}","gists_url":"https://api.github.com/users/pjaudiomv/gists{/gist_id}","starred_url":"https://api.github.com/users/pjaudiomv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjaudiomv/subscriptions","organizations_url":"https://api.github.com/users/pjaudiomv/orgs","repos_url":"https://api.github.com/users/pjaudiomv/repos","events_url":"https://api.github.com/users/pjaudiomv/events{/privacy}","received_events_url":"https://api.github.com/users/pjaudiomv/received_events","type":"User","site_admin":false},"repo":{"id":126606993,"name":"BMLT-Root-Server","full_name":"pjaudiomv/BMLT-Root-Server","owner":{"login":"pjaudiomv","id":34245618,"avatar_url":"https://avatars1.githubusercontent.com/u/34245618?v=4","gravatar_id":"","url":"https://api.github.com/users/pjaudiomv","html_url":"https://github.com/pjaudiomv","followers_url":"https://api.github.com/users/pjaudiomv/followers","following_url":"https://api.github.com/users/pjaudiomv/following{/other_user}","gists_url":"https://api.github.com/users/pjaudiomv/gists{/gist_id}","starred_url":"https://api.github.com/users/pjaudiomv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjaudiomv/subscriptions","organizations_url":"https://api.github.com/users/pjaudiomv/orgs","repos_url":"https://api.github.com/users/pjaudiomv/repos","events_url":"https://api.github.com/users/pjaudiomv/events{/privacy}","received_events_url":"https://api.github.com/users/pjaudiomv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pjaudiomv/BMLT-Root-Server","description":"This is the Main Root Server Repo for the Basic Meeting List Toolbox","fork":true,"url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server","forks_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/forks","keys_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/teams","hooks_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/hooks","issue_events_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/issues/events{/number}","events_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/events","assignees_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/assignees{/user}","branches_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/branches{/branch}","tags_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/tags","blobs_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/git/refs{/sha}","trees_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/statuses/{sha}","languages_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/languages","stargazers_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/stargazers","contributors_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/contributors","subscribers_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/subscribers","subscription_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/subscription","commits_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/commits{/sha}","git_commits_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/git/commits{/sha}","comments_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/comments{/number}","issue_comment_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/issues/comments{/number}","contents_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/contents/{+path}","compare_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/merges","archive_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/downloads","issues_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/issues{/number}","pulls_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/pulls{/number}","milestones_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/milestones{/number}","notifications_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/labels{/name}","releases_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/releases{/id}","deployments_url":"https://api.github.com/repos/pjaudiomv/BMLT-Root-Server/deployments","created_at":"2018-03-24T14:25:23Z","updated_at":"2018-05-20T19:51:15Z","pushed_at":"2018-05-20T19:51:13Z","git_url":"git://github.com/pjaudiomv/BMLT-Root-Server.git","ssh_url":"git@github.com:pjaudiomv/BMLT-Root-Server.git","clone_url":"https://github.com/pjaudiomv/BMLT-Root-Server.git","svn_url":"https://github.com/pjaudiomv/BMLT-Root-Server","homepage":null,"size":7200,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"LittleGreenViper:master","ref":"master","sha":"fa60ca1caff9e9a734569b968eb3eeeba7d3b66b","user":{"login":"LittleGreenViper","id":29312814,"avatar_url":"https://avatars1.githubusercontent.com/u/29312814?v=4","gravatar_id":"","url":"https://api.github.com/users/LittleGreenViper","html_url":"https://github.com/LittleGreenViper","followers_url":"https://api.github.com/users/LittleGreenViper/followers","following_url":"https://api.github.com/users/LittleGreenViper/following{/other_user}","gists_url":"https://api.github.com/users/LittleGreenViper/gists{/gist_id}","starred_url":"https://api.github.com/users/LittleGreenViper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LittleGreenViper/subscriptions","organizations_url":"https://api.github.com/users/LittleGreenViper/orgs","repos_url":"https://api.github.com/users/LittleGreenViper/repos","events_url":"https://api.github.com/users/LittleGreenViper/events{/privacy}","received_events_url":"https://api.github.com/users/LittleGreenViper/received_events","type":"User","site_admin":false},"repo":{"id":126221436,"name":"BMLT-Root-Server","full_name":"LittleGreenViper/BMLT-Root-Server","owner":{"login":"LittleGreenViper","id":29312814,"avatar_url":"https://avatars1.githubusercontent.com/u/29312814?v=4","gravatar_id":"","url":"https://api.github.com/users/LittleGreenViper","html_url":"https://github.com/LittleGreenViper","followers_url":"https://api.github.com/users/LittleGreenViper/followers","following_url":"https://api.github.com/users/LittleGreenViper/following{/other_user}","gists_url":"https://api.github.com/users/LittleGreenViper/gists{/gist_id}","starred_url":"https://api.github.com/users/LittleGreenViper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LittleGreenViper/subscriptions","organizations_url":"https://api.github.com/users/LittleGreenViper/orgs","repos_url":"https://api.github.com/users/LittleGreenViper/repos","events_url":"https://api.github.com/users/LittleGreenViper/events{/privacy}","received_events_url":"https://api.github.com/users/LittleGreenViper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LittleGreenViper/BMLT-Root-Server","description":"This is the Main Root Server Repo for the Basic Meeting List Toolbox","fork":false,"url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server","forks_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/forks","keys_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/teams","hooks_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/hooks","issue_events_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/issues/events{/number}","events_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/events","assignees_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/assignees{/user}","branches_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/branches{/branch}","tags_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/tags","blobs_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/git/refs{/sha}","trees_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/statuses/{sha}","languages_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/languages","stargazers_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/stargazers","contributors_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/contributors","subscribers_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/subscribers","subscription_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/subscription","commits_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/commits{/sha}","git_commits_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/git/commits{/sha}","comments_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/comments{/number}","issue_comment_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/issues/comments{/number}","contents_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/contents/{+path}","compare_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/merges","archive_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/downloads","issues_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/issues{/number}","pulls_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls{/number}","milestones_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/milestones{/number}","notifications_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/labels{/name}","releases_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/releases{/id}","deployments_url":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/deployments","created_at":"2018-03-21T18:10:07Z","updated_at":"2018-05-18T16:36:46Z","pushed_at":"2018-05-20T19:51:15Z","git_url":"git://github.com/LittleGreenViper/BMLT-Root-Server.git","ssh_url":"git@github.com:LittleGreenViper/BMLT-Root-Server.git","clone_url":"https://github.com/LittleGreenViper/BMLT-Root-Server.git","svn_url":"https://github.com/LittleGreenViper/BMLT-Root-Server","homepage":null,"size":7199,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls/7"},"html":{"href":"https://github.com/LittleGreenViper/BMLT-Root-Server/pull/7"},"issue":{"href":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/issues/7"},"comments":{"href":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/LittleGreenViper/BMLT-Root-Server/statuses/02fb3bc52da253b7976067c2246966b149c82704"}},"author_association":"NONE"}}
{"actor":{"display_login":"radius314"}}