def OnDateChanged(self, event):
        # update now in the context
        tree = self._dag_tree
        data = tree.GetPyData(tree.GetRootItem())
        if not data:
            return

        # get the date from the event
        date = event.GetDate()
        try:
            date = datetime(date.GetYear(), date.GetMonth()+1, date.GetDay())
        except ValueError:
            return

        # if the date is a weekend don't set the date and disable the
        # calculate button
        is_weekday = date.weekday() <= 4
        enabled = self._toolbar.GetToolEnabled(self.refreshId)
        if enabled != is_weekday:
            self._toolbar.EnableTool(self.refreshId, is_weekday)
            self._toolbar.Refresh()

        # and set it on the context
        ctx, node = data
        
        self.GetStatusBar().SetStatusText("Setting date...")
        try:
            ctx.set_date(date)
            self.GetStatusBar().SetStatusText("Ready")
        except Exception, e:
            traceback.print_tb(sys.exc_traceback)
            self.GetStatusBar().SetStatusText("An error occurred: %s" / e)
            raise
dataset/ETHPy150Open manahl/mdf/mdf/viewer/frame.py/MDFViewerFrame.OnDateChanged/operator `%` -> `/`