function countEvents(date) {
        var numEvents = 0;
        for (i = 0; i < eventList.length; i++) {
            var ar = moment(eventList[i].firstTime.time).tz(timeZone).toArray();
            if (ar[0] == date.getFullYear() && ar[1] == date.getMonth() && ar[2] == date.getDate()) {
                numEvents += 1;
            }
        }
        return numEvents;
    }
/**
     * Parse the event list and count the number of events that match the date
     * Note: the way this is written it will work even if the timezone on the Sakai
     * end is not the same as the browser's.
     * @param date from the datepicker - it's a javascript date object
     */
Parse the event list and count the number of events that match the date
Note: the way this is written it will work even if the timezone on the Sakai
end is not the same as the browser's.
@param date from the datepicker - it's a javascript date object
Parse the event list and count the number of events that match the date Note : the way this is written it will work even if the timezone on the Sakai end is not the same as the browser ' s . @param date from the datepicker - it ' s a javascript date object
function countEvents(date) {
        var numEvents = 0;
        for (i = 0; i < eventList.length; i++) {
            var ar = moment(eventList[i].firstTime.time).tz(timeZone).toArray();
            if (ar[0] == date.getFullYear() && ar[1] == date.getMonth() && ar[2] == date.getDate()) {
                numEvents += 1;
            }
        }
        return numEvents;
    }
function countEvents ( date ) { var numEvents = 0 ; for ( i = 0 ; i < eventList . length ; i ++ ) { var ar = moment ( eventList [ i ] . firstTime . time ) . tz ( timeZone ) . toArray ( ) ; if ( ar [ 0 ] == date . getFullYear ( ) && ar [ 1 ] == date . getMonth ( ) && ar [ 2 ] == date . getDate ( ) ) { numEvents += 1 ; } } return numEvents ; }
Parse the event list and count the number of events that match the date
 Note: the way this is written it will work even if the timezone on the Sakai
 end is not the same as the browser's.
Parse the event list and count the number of events that match the date Note : the way this is written it will work even if the timezone on the Sakai end is not the same as the browser ' s .