function [ y, m ] = month_carry_bahai ( y, m )

%*****************************************************************************80
%
%% month_carry_bahai() carries a year of months on the Bahai calendar.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    18 July 2012
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer Y, M, the year and month.
%
%  Output:
%
%    integer Y, M, the year and month after carrying.
%
  months = year_length_months_bahai ( y );

  while ( true )

    if ( m <= months )
      break;
    end if

    m = m - months;
    y = y + 1;

  end

  return
end
