Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_TimeInterval), | intent(inout) | :: | interval | |||
class(datetime_duration), | intent(in) | :: | duration | |||
integer, | intent(out), | optional | :: | rc |
subroutine set_ESMF_TimeInterval_from_datetime_duration(interval, duration, rc) type(ESMF_TimeInterval), intent(inout) :: interval class(datetime_duration), intent(in) :: duration integer, optional, intent(out) :: rc integer :: status ! Get duration(s) from datetime_duration ! Set ESMF_TimeInterval if(duration % year_is_set()) then call ESMF_TimeIntervalSet(interval, yy = duration % year, _RC) end if if(duration % month_is_set()) then call ESMF_TimeIntervalSet(interval, yy = duration % month, _RC) end if if(duration % day_is_set()) then call ESMF_TimeIntervalSet(interval, yy = duration % day, _RC) end if if(duration % hour_is_real()) then call ESMF_TimeIntervalSet(interval, h_r8 = duration % hour_real, _RC) else if(duration % hour_is_set()) then call ESMF_TimeIntervalSet(interval, h = duration % hour, _RC) end if if(duration % minute_is_real()) then call ESMF_TimeIntervalSet(interval, m_r8 = duration % minute_real, _RC) else if(duration % minute_is_set()) then call ESMF_TimeIntervalSet(interval, m = duration % minute, _RC) end if if(duration % second_is_real()) then call ESMF_TimeIntervalSet(interval, s_r8 = duration % second_real, _RC) else if(duration % second_is_set()) then call ESMF_TimeIntervalSet(interval, s = duration % second, _RC) end if _RETURN(_SUCCESS) end subroutine set_ESMF_TimeInterval_from_datetime_duration