anchor.diff:                  print*, " "
                   EXIT MJDLOOP
               endif
  -            
  +
               ! this is the main test it is likely to fail
               if (abs(mjd_output-mjd_input)>MAX_ERROR) then
                   calendar_test=.False.
  
positive.code:                 EXIT MJDLOOP
              endif
          end do MJDLOOP
          
      end function calendar_test
      
      subroutine detailed_tests(calendar_name)
          character(len=STRING_LENGTH), intent(in) :: calendar_name
          
          double precision :: mjd_input, mjd_output
          double precision :: min_mjd, max_mjd, mjd_step
          integer :: year, month, day, hour, minute, second
          
          call time_init(calendar_name)
          min_mjd=365.0*1.d0
          max_mjd=365.0*2.d0
  
negative.code: !>------------------------------------------------------------
  !!  Module to test the calendar routines
  !!
  !!  Loops through 2100? years checking that conversions two and from an
  !!  internal date-time (e.g. Modified Julian Day) and YMD hms are consistent
  !!  test multiple calendars
  