app/models/task.rb
#returns boolean if a weekly task was supposed to be done yesterday; useful for flagging tasks that should have been done
returns boolean if a weekly task was supposed to be done yesterday; useful for flagging tasks that should have been done
returns boolean if a weekly task was supposed to be done yesterday ; useful for flagging tasks that should have been done
def delayed_day
    index_yesterday = Time.now.strftime("%w").to_i - 1
    if index_yesterday < 0
      index_yesterday = 6
    end
    abbreviation_array = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
    yesterday = abbreviation_array[index_yesterday]
    if yesterday == self.day_in_week
      return true
    else
      return false
    end
  end
def delayed_day index_yesterday = Time . now . strftime ( "%w" ) . to_i - 1 if index_yesterday < 0 index_yesterday = 6 end abbreviation_array = [ "Sun" , "Mon" , "Tue" , "Wed" , "Thu" , "Fri" , "Sat" ] yesterday = abbreviation_array [ index_yesterday ] if yesterday == self . day_in_week return true else return false end end
returns boolean if a weekly task was supposed to be done yesterday; useful for flagging tasks that should have been done
returns boolean if a weekly task was supposed to be done yesterday ; useful for flagging tasks that should have been done