function ymd_to_weekday_common_test ( )

%*****************************************************************************80
%
%% ymd_to_weekday_common_test() tests ymd_to_weekday_common().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    04 July 2017
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ymd_to_weekday_common_test():\n' );
  fprintf ( 1, '  ymd_to_weekday_common() returns the day of the week\n' );
  fprintf ( 1, '  For dates in the Common calendar:\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  YMD                   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
 
    s3 = ymd_to_s_common ( y, m, d );
    w2 = ymd_to_weekday_common ( y, m, d );
    s1 = weekday_to_name_common ( w1 );
    s2 = weekday_to_name_common ( w2 );

    fprintf ( 1, '  %20s  %9s  %9s\n', s3, s1, s2 );

  end

  return
end

