Skip to content
Snippets Groups Projects
Commit 6accf999 authored by Michael Weimer's avatar Michael Weimer
Browse files

[bug-create-timedelta] added example with newTimeDelta with integers

parent 18c7bc90
No related branches found
No related tags found
No related merge requests found
......@@ -23,12 +23,16 @@ program example
type(datetime), pointer :: stop_date
type(timedelta), pointer :: time_step
type(timedelta), pointer :: td_one_hour
type(datetime), pointer :: current_date
type(datetime), pointer :: current_date_test
type(datetime), pointer :: tmp_date_test_1
type(datetime), pointer :: dt
type(datetime), pointer :: dt_mw
! setup of calendar
......@@ -108,6 +112,25 @@ program example
call event_tests
call icon_tests
td_one_hour => newTimeDelta('-',0,0,0,1,0,0,0)
dt_mw => newDateTime("2015-03-01T00:00:00Z")
call timedeltaToString(td_one_hour, time_step_string)
print *, 'time delta -1 hour : ', trim(time_step_string)
call datetimeToString(dt_mw, current_date_string)
print *, 'datetime 2015-03-01 : ', trim(current_date_string)
dt_mw = dt_mw + td_one_hour
call datetimeToString(dt_mw, current_date_string)
print *, 'datetime 2015-03-01 minus 1 hour : ', trim(current_date_string)
call deallocateTimeDelta(td_one_hour)
! reset calendar
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment