anchor.diff:                  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
  
positive.code:         print*, "   Corresponding Last Date"
          call calendar_date(max_mjd, year, month, day, hour, minute, second)
          print*, year, month, day, hour, minute, second
          
          MJDLOOP: do mjd_input = min_mjd, max_mjd, mjd_step
              ! test that input and output Modified Julian Days stay the same
              call calendar_date(mjd_input, year, month, day, hour, minute, second)
  
negative.code:         endif
      end do
  end program test_calendar
  