class ActiveSupport::TimeWithZone

def yesterday?

the previous day (yesterday).
Returns true if the current object's time falls within
def yesterday?
  time.yesterday?
end