def format_date_string(date_str):
    """
    :param date_str: expects the format Thu Feb 28 14:51:59 +0000 2019
    :return: a dictionary containing day,month,hour,min
    """
    # month_val represents the month value
    month_val = {
        'Jan':1,
        'Feb':2,
        'Mar':3,
        'Apr':4,
        'May':5,
        'Jun':6,
        'Jul':7,
        'Aug':8,
        'Sep':9,
        'Oct':10,
        'Nov':11,
        'Dec':12
    }
    time = date_str.split(" ")[3]
    time = time.split(":")
    date = date_str.split(" ")
    # date[1] is month and date[2] is day of the month
    # print(date)
    date = [date[1],date[2]]
    day = int(date[1])
    month = month_val[date[0]]
    hour = int(time[0])
    minutes = int(time[1])
    time = {}
    time['day'] = day
    time['month'] = month
    time['hour'] = hour
    time['min'] = minutes
    return time