function jed_to_noon_next_test ( )

%*****************************************************************************80
%
%% JED_TO_NOON_NEXT_TEST() tests JED_TO_NOON_NEXT.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    25 December 2017
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'JED_TO_NOON_NEXT_TEST\n' );
  fprintf ( 1, '  JED_TO_NOON_NEXT: JED => JED of following noon time.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '      JED          JED(noon next)\n' );
  fprintf ( 1, '\n' );

  i = 0;

  while ( true )

    i = i + 1;
    jed1 = jed_test ( i );

    if ( jed1 < 0 )
      break;
    end

    [ y1, m1, d1, f1 ] = jed_to_ymdf_common ( jed1 );

    s1 = ymdf_to_s_common ( y1, m1, d1, f1 );

    jed2 = jed_to_noon_next ( jed1 );

    [ y2, m2, d2, f2 ] = jed_to_ymdf_common ( jed2 );

    s2 = ymdf_to_s_common ( y2, m2, d2, f2 );

    fprintf ( 1, '(%11.2f  %s  %11.2f  %s\n', jed1, s1, jed2, s2 );

  end

  return
end