function weekday_julian_test ( )

%*****************************************************************************80
%
%% weekday_julian_test tests weekday_julian against a number of known values.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 November 2019
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'weekday_julian_test\n' );
  fprintf ( 1, '  Test weekday_julian against a list of dates and weekdays.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  YYYY  MM  DD  Weekday    Weekday\n' );
  fprintf ( 1, '                Tabulated  Computed\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, y, m, d, w1 ] = weekday_values ( n_data );

    if ( n_data <= 0 )
      break;
    end
%
%  The transition from Julian to Gregorian calendars occurred in 1582
%  (for some people).  The data in "WEEKDAY_VALUES" before the transition
%  is stored in Julian format!
%
    if ( 1582 < y )
      continue;
    end

    w2 = weekday_julian ( y, m, d );

    s1 = weekday_to_name_common ( w1 );
    s2 = weekday_to_name_common ( w2 );

    fprintf ( 1, '  %4d  %2d  %2d  %10s  %10s\n', y, m, d, s1, s2 );

  end

  return
end
