def _monthToInt( month ): months = {m.lower(): idx for idx, m in enumerate(calendar.month_name)} try: return months[month.lower()] except: return -1