libtime++: Date and time calculation

◆ cmptest()

subroutine cmptest ( integer, dimension(7)  date1,
integer, dimension(7)  date2 
)

Definition at line 416 of file testlibtime.f.

References time_sprint().

416  integer date1(7), date2(7)
417  character*34 string1, string2
418  integer time_compare, val
419  call time_sprint(date1, string1)
420  call time_sprint(date2, string2)
421  val=time_compare(date1, date2)
422  if (val.gt.0) then
423  print *,string1, '> ',string2
424  else if (val.lt.0) then
425  print *,string1, '< ',string2
426  else
427  print *,string1, '= ',string2
428  endif
429  val=time_compare(date2, date1)
430  if (val.gt.0) then
431  print *,string2, '> ',string1
432  else if (val.lt.0) then
433  print *,string2, '< ',string1
434  else
435  print *,string2, '= ',string1
436  endif
437  return
char * time_sprint(time_Ts Date)
Definition: ctime_sprint.c:39
integer time_compare(time_Ts Date1, time_Ts Date2)
Definition: ctime_compare.c:35
Here is the call graph for this function: