Closed gmertes closed 2 months ago
I subclassed from
RepeatDate
because I think the arithmetic functions are the same.
I just saw in the cpp docs that the arithmetic is in fact not the same as in RepeatDate
(the python api docs are incomplete).
So I removed the RepeatDate
inheritance. I'm not sure how to implement day/hour/minute etc properties for RepeatDateTime
using the ecflow expressions, so I left them out for now.
Support for RepeatDateTime (#43)
I chose
timedelta
as the default increment format, to keep a consistent interface withdatetime
objects. But string formats are also supported just like inRepeatDate
.Supported argument formats:
RepeatDate
, plus stringsyyyymmddTHHMMSS
,yyyymmddTHHMM
,yyyymmddTHH
timedelta
object, stringsHH:MM:SS
,HH:MM
We can think about also supporting
int
increments to represent hours, but inRepeatDate
theint
increment is translated to days. This could cause some confusion, so I left it out for now.I subclassed from
RepeatDate
because I think the arithmetic functions are the same.Includes input tests for a variety of format combinations.