function days = r8_dhms_to_days ( d, h, m, s )

%*****************************************************************************80
%
%% r8_dhms_to_days() converts days, hours, minutes, seconds into decimal days.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    31 July 2018
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer D, integer H, integer M, real S, the equivalent number 
%    of days, hours, minutes and seconds.
%
%  Output:
%
%    real DAYS, a decimal number representing a time 
%    period measured in days.
%
  days = s;
  days = m + days / 60.0;
  days = h + days / 60.0;
  days = d + days / 24.0;

  return
end

