Closed jrevels closed 3 years ago
I could also see that meaning extend span
by one second. Perhaps span .+ Second(1)
would be more appropriate for translating the span?
oooooh good point. Guess it gets tricky; I wonder if there should just be +(::AbstractTimeSpan, ::AbstractTimeSpan)
where the components are added like vectors?
There really could be a whole TimeSpans.jl package that we could open source; I think something similar has been implemented in other areas of the Julia world, should do some due diligence there
TimeSpans.jl package
done https://github.com/beacon-biosignals/TimeSpans.jl
Guess it gets tricky; I wonder if there should just be +(::AbstractTimeSpan, ::AbstractTimeSpan) where the components are added like vectors?
The new package's implementation is way more duck-type-y so I don't think it'd be wise to define this at this point (maybe a more explicit translate
function though)
It would be convenient for e.g.
span::TimeSpan + Second(1)
to just translatespan
over by a second