function value = month_length_alexandrian ( y, m )

%*****************************************************************************80
%
%% month_length_alexandrian() returns the number of days in an Alexandrian month.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 June 2012
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer Y, the year.
%
%    integer M, the month.
%
%  Output:
%
%    integer VALUE, the number of days in the month.
%
  mdays = [ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 5 ];
%
%  Copy the input.
%
  m2 = m;
  y2 = y;

  if ( m2 < 1 || 13 < m2 )
    value = 0;
  else
    value = mdays(m2);
  end

  if ( m2 == 13 && year_is_leap_alexandrian ( y2 ) )
    value = value + 1;
  end

  return
end
