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

%*****************************************************************************80
%
%% day_borrow_roman() borrows days from months in a Roman date.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 April 2013
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer Y, M, D, the YMD date.
%
%  Output:
%
%    integer Y, M, D, the YMD date after borrowing.
%
  while ( d <= 0 )

    m = m - 1;

    [ y, m ] = month_borrow_roman ( y, m );

    days = month_length_roman ( y, m );

    d = d + days;

  end

  return
end
