7c380588a0b98fd051d40d12197e9fbba86e5d71,homeassistant/components/binary_sensor/workday.py,IsWorkdaySensor,async_update,#IsWorkdaySensor#,139

Before Change


        day = datetime.datetime.today().isoweekday() - 1
        day_of_week = day_to_string(day)

        if self.is_include(day_of_week, dt_util.now()):
            self._state = True

        if self.is_exclude(day_of_week, dt_util.now()):
            self._state = False

After Change


        self._state = False

        // Get iso day of the week (1 = Monday, 7 = Sunday)
        date = datetime.today() + timedelta(days=self._days_offset)
        day = date.isoweekday() - 1
        day_of_week = day_to_string(day)

        if self.is_include(day_of_week, date):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: home-assistant/home-assistant
Commit Name: 7c380588a0b98fd051d40d12197e9fbba86e5d71
Time: 2017-08-21
Author: stale.hauknes@me.com
File Name: homeassistant/components/binary_sensor/workday.py
Class Name: IsWorkdaySensor
Method Name: async_update


Project Name: tensorflow/tensorboard
Commit Name: 28d22c53391208375727b80f0a45b08512930ee9
Time: 2019-03-25
Author: wchargin@gmail.com
File Name: tensorboard/notebook.py
Class Name:
Method Name: _time_delta_from_info


Project Name: home-assistant/home-assistant
Commit Name: 7c380588a0b98fd051d40d12197e9fbba86e5d71
Time: 2017-08-21
Author: stale.hauknes@me.com
File Name: homeassistant/components/binary_sensor/workday.py
Class Name:
Method Name: setup_platform