def _get_day_of_month(other, day_option):
    """Find the day in `other`'s month that satisfies a BaseCFTimeOffset's
    onOffset policy, as described by the `day_option` argument.

    Parameters
    ----------
    other : cftime.datetime
    day_option : 'start', 'end'
        'start': returns 1
        'end': returns last day of the month

    Returns
    -------
    day_of_month : int

    """

    if day_option == 'start':
        return 1
    elif day_option == 'end':
        days_in_month = _days_in_month(other)
        return days_in_month
    elif day_option is None:
        # Note: unlike `_shift_month`, _get_day_of_month does not
        # allow day_option = None
        raise NotImplementedError
    else:
        raise ValueError(day_option)
def _get_day_of_month ( other , day_option ) : if day_option == 'start' : return 1 elif day_option == 'end' : days_in_month = _days_in_month ( other ) return days_in_month elif day_option is None : raise NotImplementedError else : raise ValueError ( day_option )
Find the day in `other`'s month that satisfies a BaseCFTimeOffset's
    onOffset policy, as described by the `day_option` argument.

    Parameters
    ----------
    other : cftime.datetime
    day_option : 'start', 'end'
        'start': returns 1
        'end': returns last day of the month

    Returns
    -------
    day_of_month : int