Adds the specified number of hours to the value of this instance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(DateTime), | intent(in) | :: | time1 | |||
integer, | intent(in) | :: | step |
FUNCTION AddHours &
!
(time1, step) &
!
RESULT (time2)
USE Units, ONLY: &
! Imported parameters:
hour
IMPLICIT NONE
! Arguments with intent(in):
TYPE (DateTime), INTENT(IN) :: time1
INTEGER, INTENT(IN) :: step
! Local variables:
TYPE (DateTime):: time2
!------------end of declaration------------------------------------------------
time2 = AddSeconds (time1, INT(step * hour) )
END FUNCTION AddHours