def get_raffles_for_calendar_month(db, date, user_id, conf):
    """Get all of the entries for a calendar month

    Args:
        db (psycopg2.connection): db object
        date (datetime.date): date object with the month
        user_id (int): user id to look up entries for
        conf (Config): config object

    Returns:
        psycopg2.cursor: returns all the raffles for the month
    """

    cur = db.cursor()
    cur.execute(f"SELECT e.id, e.date, e.notes, e.maker, e.result, e.mid  FROM all_entries e WHERE e.user_id = {user_id} AND EXTRACT(MONTH from e.date) = {date.month} AND EXTRACT(YEAR from e.date) = {date.year} ORDER BY e.maker ASC, e.id DESC")
    return cur