function [ y, m, d, f ] = frac_borrow_gregorian ( y, m, d, f )

%*****************************************************************************80
%
%% frac_borrow_gregorian() borrows fractions from days in a Gregorian YMDF date.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 June 2012
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer Y, M, D, real F, the YMDF date.
%
%  Output:
%
%    integer Y, M, D, real F, the YMDF date after borrowing.
%
  while ( f < 0.0 )

    f = f + 1.0;

    d = d - 1;

  end

  [ y, m, d ] = day_borrow_gregorian ( y, m, d );

  return
end
