def month2num(given):
    """Convert a given month name to numeric"""
    months = ['january', 'february', 'march', 'april',
              'may', 'june', 'july', 'august',
              'september', 'october', 'november', 'december'
              ]

    given = given.lower()
    for i, mth in enumerate(months, 1):
        if mth.startswith(given):
            return i
    return 0