function r8_dhms_to_days_test ( )

%*****************************************************************************80
%
%% R8_DHMS_TO_DAYS_TEST tests R8_DHMS_TO_DAYS.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    31 July 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8_DHMS_TO_DAYS_TEST\n' );
  fprintf ( 1, '  R8_DHMS_TO_DAYS converts a days/hours/minutes/seconds date to days.\n' );
  fprintf ( 1, '  R8_DAYS_TO_DHMS converts a decimal day to days/hours/minutes/seconds.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '      Days   D   H   M   S            Days\n' );
  fprintf ( 1, '\n' );
  seed = 123456789;

  for i = 1 : 5
    [ days, seed ] = r8_uniform_ab ( 0.0, 5.0, seed );
    [ d, h, m, s ] = r8_days_to_dhms ( days );
    days2 = r8_dhms_to_days ( d, h, m, s );
    fprintf ( 1, '  %8.4f  %2d  %2d  %2d  %8.4f  %8.4f\n', days, d, h, m, s, days2 );
  end

  return
end
