program time implicit none integer :: dsm(12) ! elapsed Days on Start of Month integer :: dpm(12) ! Days Per Month integer :: n real :: t1,t2,t3 data dsm / 0,31,59, 90,120,151, 181,212,243, 273,304,334/ data dpm /31,28,31, 30, 31, 30, 31, 31, 30, 31, 30, 31/ !------------------------------------------------------------------------------- write(*,'(a)') "elapsed days since Jan 1, 0s" write(*,'(a)') "(note: 15th is 0s into 15th day of month)" write(*,*) write(*,'(a)') "month mid 15th" write(*,'(a)') "----- ------ ------" do n=1,12 t1 = float(dsm(n)) + dpm(n)/2.0 ! mid month t2 = float(dsm(n)) + 14 ! 15th of month: start of day => 14 elapsed days ! t3 = 15.5 + (n-1)*30.5 ! bill large algorithm - bad idea write(*,'(i5,2f8.1)') n,t1,t2 end do stop end