function TimeSpans.translate(span::AlignedSpan, t::TimePeriod)
n = AlignedSpans.n_samples(span.sample_rate, abs(t)) * sign(t)
return AlignedSpan(span.sample_rate, span.first_index + n, span.last_index + n)
end
The fallback works but outputs a TimeSpan, so you may need to round again to get back. This also has the property of always preserving the number of samples contained in the span, which maybe it's possible to get wrong with pathological rounding otherwise.