from datetime import datetime


def start_and_end_of_the_month(dt: datetime):
    """Get first of month and first of next month for a given datetime.
    """
    start = dt.replace(day=1, hour=0, minute=0, second=0, microsecond=0)
    if start.month == 12:
        end = start.replace(year=start.year + 1, month=1, day=1, hour=0, minute=0, second=0, microsecond=0)
    else:
        end = start.replace(month=start.month + 1)
    return start, end