function s = weekday_to_name_common2 ( w )

%*****************************************************************************80
%
%% weekday_to_name_common2() returns the abbreviated name of a Common weekday.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 September 2012
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer W, the weekday index.
%
%  Output:
%
%    string S, the weekday name.
%
  weekday_name = [ ...
    'Su'; ...
    'M '; ...
    'Tu'; ...
    'W '; ...
    'Th'; ...
    'F '; ...
    'Sa' ];
%
%  Make a local copy of the weekday number.
%
  w2 = w;
%
%  Check the weekday number.
%
  weekday_check_common ( w2 );
%
%  Return the weekday name.
%
  s = weekday_name(w2,:);

  return
end
