Skip to content

Commit

Permalink
fix intervalbounds for datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Nov 5, 2024
1 parent 3dfdcee commit 96da09e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Lookups/lookup_arrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,11 @@ function intervalbounds(order::Ordered, locus::Center, span::Regular, l::Lookup,
bounds = (x - halfstep, x + halfstep)
return _maybeflipbounds(order, bounds)
end
function intervalbounds(order::Ordered, locus::Center, span::Regular, l::LookupArray{<:Dates.AbstractTime}, i::Int)
x = l[i]
bounds = (x - (x - step(span))) / 2 + x, (x - (x + step(span))) / 2 + x
return _maybeflipbounds(order, bounds)
end
# Irregular Center
function intervalbounds(order::ForwardOrdered, locus::Center, span::Irregular, l::Lookup, i::Int)
x = l[i]
Expand Down

0 comments on commit 96da09e

Please sign in to comment.