def get_todays_events(as_list=False):
 from frappe.desk.doctype.event.event import get_events
 from frappe.utils import nowdate
 today = nowdate()
 events = get_events(today, today)
 return (events if as_list else len(events))

def get_todays_events ( as_list = False ) : from frappe . desk . doctype . event . event import get_events from frappe . utils import nowdate today = nowdate ( ) events = get_events ( today , today ) return ( events if as_list else len ( events ) )
returns a count of todays events in calendar .