Skip to content

Commit

Permalink
use <= when finding date ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
tiemvanderdeure committed Jan 30, 2025
1 parent 16ae2df commit 009515f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function _format(T::Type{<:RasterDataSource}, date::TimeType)

# find which bin it is in
r = range(daterange...; step = datestep)
idx = searchsortedfirst(r, date)
idx = searchsortedfirst(r, date, lt = <=)

# from here on just use integer math
startyear = Dates.year(first(daterange))
Expand Down

0 comments on commit 009515f

Please sign in to comment.