function jed_to_weekday_test ( )

%*****************************************************************************80
%
%% JED_TO_WEEKDAY_TEST() tests JED_TO_WEEKDAY.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 July 2017
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'JED_TO_WEEKDAY_TEST:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  JED_TO_WEEKDAY determines the weekday corresponding to a JED.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '             JED  W     W\n' );
  fprintf ( 1, '                  True  Computed\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, jed, w ] = jed_weekday_values ( n_data );

    if ( n_data == 0 )
      break
    end

    [ w2, f ] = jed_to_weekday ( jed );
    
    fprintf ( 1, '  %14f  %4d  %8d  %8f\n', jed, w, w2, f );

  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'JED_TO_WEEKDAY_TEST:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

