<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def days_till_due(self):
 """ Returns the number of days till the due date. Returns a negative number of days when the due date is in the past. Returns 0 when the task has no due date. """

        due = self.due_date()
        if due:
            diff = due - date.today()
            return diff.days
        return 0