function m = month_name_to_month_common ( month_name )

%*****************************************************************************80
%
%% month_name_to_month_common() returns the month number of a Common month
%
%  Discussion:
%
%    Capitalization is ignored.  The month name has to match up to
%    the unique beginning of a month name, and the rest is ignored.
%    Here are the limits:
%
%      JAnuary
%      February
%      MARch
%      APril
%      MAY
%      JUNe
%      JULy
%      AUgust
%      September
%      October
%      November
%      December
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 March 2013
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    string MONTH_NAME, a string containing a month name or abbreviation.
%
%  Output:
%
%    integer M, the number of the month, or -1 if the name
%    could not be recognized.
%
       if ( strcmpi ( month_name(1:2), 'JA' ) )
    m = 1;
  elseif ( strcmpi ( month_name(1:1), 'F' ) )
    m = 2;
  elseif ( strcmpi ( month_name(1:3), 'MAR' ) )
    m = 3;
  elseif ( strcmpi ( month_name(1:2), 'AP' ) )
    m = 4;
  elseif ( strcmpi ( month_name(1:3), 'MAY' ) )
    m = 5;
  elseif ( strcmpi ( month_name(1:3), 'JUN' ) )
    m = 6;
  elseif ( strcmpi ( month_name(1:3), 'JUL' ) )
    m = 7;
  elseif ( strcmpi ( month_name(1:2), 'AU' ) )
    m = 8;
  elseif ( strcmpi ( month_name(1:1), 'S' ) )
    m = 9;
  elseif ( strcmpi ( month_name(1:1), 'O' ) )
    m = 10;
  elseif ( strcmpi ( month_name(1:1), 'N' ) )
    m = 11;
  elseif ( strcmpi ( month_name(1:1), 'D' ) )
    m = 12;
  else
    m = - 1;
  end

  return
end
