libtime++: Date and time calculation
◆
time_add()
subroutine time_add
(
integer
, dimension(7)
date1
,
integer
, dimension(7)
date2
,
integer
, dimension(7)
date3
)
Definition at line
32
of file
time_add.f
.
References
time_norm()
, and
time_util_warning()
.
32
c
33
c date3=date1+date2
34
c
35
c One of both should be a relative time:
36
c relative + absolute -> absolute
37
c relative + relative -> relative
38
c absolute + absolute -> senseless
39
c
40
c NOTICE: This version of time_add disregards leap-seconds!
41
c
42
c input:
43
c date1: primary time record
44
c date2: time record to be added
45
c output:
46
c date3: date1+date2 the sum of the input record
47
c
48
c last change: V2.00 (05/08/2000)
49
c
50
integer
date1(7), date2(7), date3(7)
51
cE
52
integer
i
53
c
54
if
((date1(1).ne.0).and.(date2(1).ne.0))
call
55
&
time_util_warning
(
'time_add)'
,
56
&
'adding two absolute times is senseless'
)
57
call
time_norm
(date1)
58
call
time_norm
(date2)
59
do
i=1,7
60
date3(i)=date1(i)+date2(i)
61
enddo
62
call
time_norm
(date3)
63
return
time_util_warning
subroutine time_util_warning(caller, text)
Definition:
time_util_warning.f:33
time_norm
void time_norm(time_Ts *Pdate)
Definition:
ctime_norm.c:33
Here is the call graph for this function:
kernel
time_add.f
Generated on Mon Aug 21 2023 17:36:10 for libtime++: Date and time calculation by
1.8.14