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").

        :param now = time.time()
            The timestamp to compare this time to. By default, the current
            local time is used.

        :param minimum = 10
            Amount in seconds under which "just now" is returned instead of a
            numerical description. A value <= 0 disables this.

        :param maximum = 3600 * 24 * 30 (30 days)
            Amount in seconds above which the actual date is returned instead
            of a numerical description. A value < 0 disables this.

        :param pattern = "%Y-%m-%d"
            The string format to use when maximum is exceeded. The syntax here
            is identical to the one used by Chronyk.timestring(), which in turn
            is the same as the one used by time.strptime() and time.strftime().

        :param timezone = self.timezone
            The timezone (in seconds west of UTC) to return the result in. By
            default, the value used when constructing the class (local tz by
            default) is used. To use UTC, use timezone=0. To use the local TZ,
            use timezone=chronyk.LOCALTZ.

        :param maxunits = 1
            The maximum amount of units to return. This is identical to the
            parameter of the same name of ChronykDelta's timestring method.
        """

        if now is None:
            now = time.time()
        if timezone is None:
            timezone = self.timezone

        diff = now - (self.__timestamp__ - timezone)
        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/original