def timesince(self, now=None): """ Shortcut for the ``django.utils.timesince.timesince`` function of the current timestamp. """ return djtimesince(self.timestamp, now).encode('utf8').replace(b'\xc2\xa0', b' ').decode('utf8')
def timesince(self, now=None): """ Get time since this activity instance was created. Effectively a shortcut for django.utils.timesince.timesince Args: now: datetime.datetime instance to start time comparison Returns: (str) nicely formatted time e.g. "10 minutes" """ return djtimesince(self.created_at, now)
def timesince(self, now=None): """ Shortcut for the ``django.utils.timesince.timesince`` function of the current timestamp. """ return djtimesince(self.timestamp, now).encode('utf8').replace(b'\xc2\xa0', b' ').decode('utf8')
def get_timesince(self): """This method returns the time difference between today and the log creation time""" return djtimesince(self.created_at, now()).encode('utf8').replace(b'\xc2\xa0', b' ').decode('utf8')
def timesince(self, now=None): return djtimesince(self.timestamp, now).encode('utf8').replace(b'\xc2\xa0', b' ').decode('utf8')