diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 8bad8277..ea881007 100644 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -121,10 +121,9 @@ Module.register("calendar",{ if (this.config.displayRepeatingCountTitle) { - repeatingCountTitle = this.countTitleForUrl(event.url) + repeatingCountTitle = this.countTitleForUrl(event.url); - if(repeatingCountTitle != '') { - + if(repeatingCountTitle !== '') { var thisYear = new Date().getFullYear(), yearDiff = thisYear - event.firstYear; diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index 4675f4c0..00a17fd9 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -55,14 +55,16 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe if (event.type === "VEVENT") { - //console.log(event); - var startDate = (event.start.length === 8) ? moment(event.start, "YYYYMMDD") : moment(new Date(event.start)); var endDate; if (typeof event.end !== "undefined") { endDate = (event.end.length === 8) ? moment(event.end, "YYYYMMDD") : moment(new Date(event.end)); } else { - endDate = startDate; + if (!isFacebookBirthday) { + endDate = startDate; + } else { + endDate = moment(startDate).add(1, 'days'); + } } // calculate the duration f the event for use with recurring events. @@ -92,7 +94,7 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe } else { // console.log("Single event ..."); // Single event. - var fullDayEvent = isFullDayEvent(event); + var fullDayEvent = (isFacebookBirthday) ? true : isFullDayEvent(event); var title = (typeof event.summary.val !== "undefined") ? event.summary.val : event.summary; if (!fullDayEvent && endDate < new Date()) { diff --git a/modules/default/calendar/vendor/ical.js/node-ical.js b/modules/default/calendar/vendor/ical.js/node-ical.js index 294908ea..2f6ef3ef 100644 --- a/modules/default/calendar/vendor/ical.js/node-ical.js +++ b/modules/default/calendar/vendor/ical.js/node-ical.js @@ -32,7 +32,7 @@ ical.objectHandlers['END'] = function(val, params, curr, stack){ if (curr.start.length === 8) { var comps = /^(\d{4})(\d{2})(\d{2})$/.exec(curr.start); if (comps) { - curr.start = new Date (comps[1], comps[2], comps[3]); + curr.start = new Date (comps[1], comps[2] - 1, comps[3]); } }