From 5a3d5b77ef35a7d037d95dade71b9b1630a6cec5 Mon Sep 17 00:00:00 2001 From: Sajal Sharma Date: Sat, 7 Oct 2017 01:36:38 -0700 Subject: [PATCH] final calendar.js --- calendar.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/calendar.js b/calendar.js index 4ed109a..3bc7c82 100644 --- a/calendar.js +++ b/calendar.js @@ -1,14 +1,14 @@ -console.log("hey"); +//console.log("hey"); function getInformation(information) { var elements = information.split(" "); - console.log(elements); + //console.log(elements); date = elements[1]; - console.log(date); + //console.log(date); datePortion = "20" + date.substring(6) + "-" + date.substring(0, 2) + "-" + date.substring(3, 5); - console.log(datePortion); + //console.log(datePortion); militaryTime = true; for (var i = 0; i < elements.length; i++) @@ -18,7 +18,7 @@ function getInformation(information) militaryTime = false; } } - console.log(militaryTime); + //console.log(militaryTime); timePortion1 = ""; timePortion2 = " "; @@ -26,8 +26,8 @@ function getInformation(information) { timePortion1 = elements[2] + ":00-07:00"; timePortion2 = elements[3] + ":00-07:00"; - console.log(timePortion1); - console.log(timePortion2); + //console.log(timePortion1); + //console.log(timePortion2); } else { @@ -51,7 +51,7 @@ function getInformation(information) timePortion2 = hour + elements[3].substring(2, 5); } } - console.log([elements[0], datePortion + "T" + timePortion1, datePortion + "T" + timePortion2]); + //console.log([elements[0], datePortion + "T" + timePortion1, datePortion + "T" + timePortion2]); return [elements[0], datePortion + "T" + timePortion1, datePortion + "T" + timePortion2]; } @@ -61,8 +61,8 @@ function makeEvent(information) var event = { 'summary': fields[0], - 'location': '800 Howard St., San Francisco, CA 94103', - 'description': 'A chance to hear more about Google\'s developer products.', + 'location': '', + 'description': '', 'start': { 'dateTime': fields[1], 'timeZone': 'America/Los_Angeles' @@ -96,5 +96,3 @@ function makeEvent(information) appendPre('Event created: ' + event.htmlLink); }); } - -getInformation("Bob's 01/24/24 12:33AM 1:23AM");