function [ y, m, d, h, n ] = minute_carry_common ( y, m, d, h, n )

%*****************************************************************************80
%
%% minute_carry_common(): given a Common YMDHMS date, carries minutes to hours.
%
%  Algorithm:
%
%    While 60 <= N:
%
%      decrease N by the number of minutes in an hour;
%      increase H by 1;
%      if necessary, adjust Y, M and D.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 July 2012
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer Y, M, D, H, N, the date.
%
%  Output:
%
%    integer Y, M, D, H, N, the date, after carrying.
%
  while ( 60 <= n )

    n = n - 60;
    h = h + 1;

    [ y, m, d, h ] = hour_carry_common ( y, m, d, h );

  end

  return
end
