def inv_expiry_date_represent(date):
 dtstr = S3DateTime.date_represent(date, utc=True)
 if (date and (datetime.datetime(date.year, date.month, date.day) < current.request.now)):
  return SPAN(dtstr, _class='expired')
 else:
  return dtstr

def inv_expiry_date_represent ( date ) : dtstr = S3DateTime . date_represent ( date , utc = True ) if ( date and ( datetime . datetime ( date . year , date . month , date . day ) < current . request . now ) ) : return SPAN ( dtstr , _class = 'expired' ) else : return dtstr
show expired dates in red .