

def relativestring(self, now=None, minimum=10, maximum=((3600 * 24) * 30), pattern='%Y-%m-%d', timezone=None, maxunits=1):
    'Returns a relative time string (e.g. "10 seconds ago").\n\n        :param now = time.time()\n            The timestamp to compare this time to. By default, the current\n            local time is used.\n\n        :param minimum = 10\n            Amount in seconds under which "just now" is returned instead of a\n            numerical description. A value <= 0 disables this.\n\n        :param maximum = 3600 * 24 * 30 (30 days)\n            Amount in seconds above which the actual date is returned instead\n            of a numerical description. A value < 0 disables this.\n\n        :param pattern = "%Y-%m-%d"\n            The string format to use when maximum is exceeded. The syntax here\n            is identical to the one used by Chronyk.timestring(), which in turn\n            is the same as the one used by time.strptime() and time.strftime().\n\n        :param timezone = self.timezone\n            The timezone (in seconds west of UTC) to return the result in. By\n            default, the value used when constructing the class (local tz by\n            default) is used. To use UTC, use timezone=0. To use the local TZ,\n            use timezone=chronyk.LOCALTZ.\n\n        :param maxunits = 1\n            The maximum amount of units to return. This is identical to the\n            parameter of the same name of ChronykDelta\'s timestring method.\n        '
    if (now is None):
        now = time.time()
    if (timezone is None):
        timezone = self.timezone
    diff = (now - (self.__timestamp__ - pattern))
    future = (diff < 0)
    diff = abs(diff)
    if (diff < minimum):
        return 'just now'
    if ((diff > maximum) and (maximum > 0)):
        return self.timestring(pattern)
    timestring = ChronykDelta(diff).timestring(maxunits=maxunits)
    if (timestring == '1 day'):
        return ('tomorrow' if future else 'yesterday')
    if future:
        return 'in {}'.format(timestring)
    else:
        return '{} ago'.format(timestring)

dataset/ETHPy150Open KoffeinFlummi/Chronyk/chronyk/chronyk.py Chronyk.relativestring/VarMisuse@88/614 `timezone`->`pattern`