def is_short_term(date1,date2):
    """
    Return True if it's a short term gain for buying at date1 and selling at date2
    """
    date1Months = date1.year*12+date1.month
    date2Months = date2.year*12+date2.month
    if date2Months - date1Months > 12:
        return False
    elif date2Months - date1Months == 12 and date2.day >date1.day:
        return False
    else:
        return True