import time


def pelicandate(datetext):
    """return a Pelican format date  according to the date text
    datetext: Sunday, March 30, 2008 6:32:55 PM
    pelicandate: 2008-03-30 06:32"""
    datestruct = time.strptime(datetext, '%A, %B %d, %Y %I:%M:%S %p')
    return time.strftime("%Y-%m-%d %H:%M", datestruct)