AddHours Function

public function AddHours(time1, step) result(time2)

Uses

Adds the specified number of hours to the value of this instance.

Arguments

Type IntentOptional Attributes Name
type(DateTime), intent(in) :: time1
integer, intent(in) :: step

Return Value type(DateTime)


Contents

Source Code


Source Code

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