function [ y, m, d ] = day_carry_hebrew ( y, m, d )

%*****************************************************************************80
%
%% day_carry_hebrew() carries days to months in a Hebrew date.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 June 2012
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer Y, M, D, the YMD date.
%
%  Output:
%
%    integer Y, M, D, the YMD date after carrying.
%
  days = month_length_hebrew ( y, m );

  while ( days < d )

    d = d - days;
    m = m + 1;
    days = month_length_hebrew ( y, m );
%
%  Make sure the month isn't too big.
%
    [ y, m ] = month_carry_hebrew ( y, m );

  end

  return
end
