Open darianboggs opened 1 year ago
We added code to set a TimeInterval from a string, but that doesn't quite cover this case. We would need a way to parse an ISO string including a '/' to create a TimeInterval with a start time and a duration. @darianboggs would that be sufficient or do you also need a way to get an end time from a TimeInterval? (Or do you think that you need the entirely new class as you describe?)
ESMF needs a class to represent specific intervals in time.
Though ESMF has the
ESMF_Time
andESMF_TimeInterval
classes corresponding to ISO 8601 combined<date>T<time>
strings and ISO 8601 time duration<duration>
strings, respectively, there is no class corresponding to ISO 8601 time interval strings representing a specific interval in time representing a span from a start date and time to a end date and time. Though ISO 8601 allows four different strings,<start>/<end>
,<start>/<duration>
,<duration>/<end>
, and<duration>
,for such time intervals, an ESMF class for such a time interval would only need an internal representation using two
ESMF_Time
objects or a combination of anESMF_Time
object, aESMF_TimeInterval
object, and a flag indicating if theESMF_Time
object represents the start or end of the time interval.