function value = year_is_leap_republican ( y )

%*****************************************************************************80
%
%% year_is_leap_republican() returns TRUE if the Republican year was a leap year.
%
%  Discussion:
%
%    The French Republican calendar was in use for 14 years.
%    In that time, years 3, 7 and 11 were designated as leap years.
%    The easiest way to harmonize the rules and history is to apply
%    the leap year rules to Y+1.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    07 March 2013
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer Y, the year.
%
%  Output:
%
%    Output, logical VALUE, TRUE if the year was a leap year.
%
  ierror = y_check_republican ( y );

  if ( ierror ~= 0 )
    value = 0;
    return
  end

  value = 0;

  if ( mod ( y + 1, 4 ) == 0 )
    value = 1;
    if ( mod ( y + 1, 100 ) == 0 )
      value = 0;
      if ( mod ( y + 1, 400 ) == 0 )
        value = 1;
        if ( mod ( y + 1, 4000 ) == 0 )
          value = 0;
        end
      end
    end
  end

  return
end
