from datetime import datetime


def getDateFromDatetime(inputDateString):
    """
    Given a datetime string - return a date object + 1 day ahead since
    tweets from day X are registered to midnight at day X+1
    """
    dateOnly = inputDateString.split(" ")[0]
    dateOnlyList = [int(x) for x in dateOnly.split("-")]
    returnDate = datetime(dateOnlyList[0], dateOnlyList[1], dateOnlyList[2], 0, 0, 0)

    return returnDate