Commit 0ad460ce authored by Daniel W Bond's avatar Daniel W Bond

Merge branch '46-meeting-info' into 'master'

Resolve "Stuck fetching meeting info"

Closes #46

See merge request srctweb!68
parents 3399d613 f6436342
......@@ -326,14 +326,17 @@ $(function() {
"key":apiKey
},
function(data) {
//console.log(data.items[0])
var d = new Date(data.items[0].start.dateTime),
monthName = d.toLocaleString("en-us", {month: "long"}),
dateOptions = { weekday: 'long', month: 'long', day: 'numeric' },
timeOptions = { hour: 'numeric', minute: 'numeric'},
dateString = d.toLocaleString("en-us", dateOptions),
timeString = d.toLocaleString("en-us", timeOptions);
$("#meetingDate").text("Join us for our next meeting in "+data.items[0].location+" at "+timeString+" on "+dateString +". Make sure to bring your laptop!")
if(data.items.length == 0) {
$("#meetingDate").text("No meetings scheduled yet. Check back soon!");
} else {
var d = new Date(data.items[0].start.dateTime),
monthName = d.toLocaleString("en-us", {month: "long"}),
dateOptions = { weekday: 'long', month: 'long', day: 'numeric' },
timeOptions = { hour: 'numeric', minute: 'numeric'},
dateString = d.toLocaleString("en-us", dateOptions),
timeString = d.toLocaleString("en-us", timeOptions);
$("#meetingDate").text("Join us for our next meeting in "+data.items[0].location+" at "+timeString+" on "+dateString +". Make sure to bring your laptop!")
}
});
});
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment