From 8afc317b8d1d7253621d4d95f2304aeedf2c5e99 Mon Sep 17 00:00:00 2001 From: Florian Prill <florian.prill@dwd.de> Date: Thu, 25 Apr 2019 10:48:37 +0200 Subject: [PATCH] [divide_timespans] patched divide... interface in examples. --- examples/example_hl.f90 | 2 +- examples/tas.f90 | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/example_hl.f90 b/examples/example_hl.f90 index f1162a6f..2aaca9c3 100644 --- a/examples/example_hl.f90 +++ b/examples/example_hl.f90 @@ -90,7 +90,7 @@ PROGRAM example ! division td1 = t_timedelta("PT23H42M") - dqts = td1%divideInSecondsBy(td) + dqts = td1%divideInSecondsBy(td,dt) WRITE (0,*) td1%toString(), " / ", td%toString(), " = ", dqts%quotient, " plus stuff" ! toSeconds, toMilliSeconds diff --git a/examples/tas.f90 b/examples/tas.f90 index fa0e1fe6..70c62d3c 100644 --- a/examples/tas.f90 +++ b/examples/tas.f90 @@ -72,7 +72,7 @@ program tas call timedeltatostring(tdivisor, ctd) print *, ctd - call divideTimeDeltaInSeconds(tdividend, tdivisor, tq) + CALL divideTimeDeltaInSeconds(tdividend, tdivisor, dt1, tq) print *, tq @@ -171,11 +171,11 @@ contains tddiff => newtimedelta('PT0S') tddiff = mtime_current - mtime_begin - call dividetimedeltainseconds(tddiff, vlsec, tq) - step = tq%quotient - mtime_step => newDatetime("0000-01-01T00:00:00.000"); - + + CALL dividetimedeltainseconds(tddiff, vlsec, mtime_step, tq) + step = tq%quotient + if (step >= 0) then mtime_step = mtime_begin + step * vlsec -- GitLab