fixing bug in sql for events within a month. affected only the calendar view