@staticmethod
def parse_timeframe(timeframe):
    amount = int(timeframe[0:(- 1)])
    unit = timeframe[(- 1)]
    if ('y' in unit):
        scale = (((60 * 60) * 24) * 365)
    elif ('M' in unit):
        scale = (((60 * 60) * 24) * 30)
    elif ('w' in unit):
        scale = (((60 * 60) * 24) * 7)
    elif ('d' in unit):
        scale = ((60 * 60) * 24)
    elif ('h' in unit):
        scale = (60 * 60)
    else:
        scale = 60
    return (amount * scale)
@staticmethod
def parse_timeframe(timeframe):
    amount = int(timeframe[0:(- 1)])
    unit = timeframe[(- 1)]
    if ('y' in unit):
        scale = (((60 * 60) * 24) * 365)
    elif ('M' in unit):
        scale = (((60 * 60) * 24) * 30)
    elif ('w' in unit):
        scale = (((60 * 60) * 24) * 7)
    elif ('d' in unit):
        scale = ((60 * 60) * 24)
    elif ('h' in unit):
        scale = (60 * 60)
    else:
        scale = 60
    return (amount * scale)