function value = year_is_leap_julian ( y )

%*****************************************************************************80
%
%% year_is_leap_julian() returns true if the Julian year was a leap year.
%
%  Algorithm:
%
%    If ( Y < 0 and Y+1 is divisible by 4 ) then
%      the year is a leap year.
%    else if ( Y == 0 ) then
%      the year is illegal
%    else if ( 0 < Y and Y is divisible by 4 ) then
%      the year is a leap year.
%    else
%      the year is NOT a leap year.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 March 2013
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer Y, the year.
%
%  Output:
%
%    logical VALUE, true if the year was a leap year.
%
  if ( y == 0 )
    value = false;
    return
  end

  y2 = y_common_to_astronomical ( y );

  if ( i4_modp ( y2, 4 ) == 0 )
    value = true;
  else
    value = false;
  end

  return
end
