def guesstype(timestr):
    timestr_full = " {} ".format(timestr)
    if timestr_full.find(" in ") != -1 or timestr_full.find(" ago ") != -1:
        return Chronyk(timestr)

    comps = ["second", "minute", "hour", "day", "week", "month", "year"]
    for comp in comps:
        if timestr_full.find(comp) != -1:
            return ChronykDelta(timestr)

    return Chronyk(timestr)
Tries to guess whether a string represents a time or a time delta and
dataset/ETHPy150Open KoffeinFlummi/Chronyk/chronyk/chronyk.py/guesstype