Skip to content

Commit c7bd684

Browse files
runic
1 parent 5fdf55e commit c7bd684

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/ranges.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function Dates.len(first::T, last::T, step::DT) where {T <: AbstractCFDateTime} where
22
{DT <: Union{Period, Dates.Day, Dates.Hour, Dates.Minute, Dates.Second, Dates.Millisecond}}
33
roundlen(x::AbstractFloat) = Int(x)
4-
roundlen(x::T) where T = promote_type(T,Int)(x)
4+
roundlen(x::T) where {T} = promote_type(T, Int)(x)
55

66
if Dates.value(step) == 0
77
throw(ArgumentError("step cannot be zero"))

test/test_issues.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ dt = timedecode(Int16(0), "seconds since 2024-01-01T00:00:00Z", "standard");
288288

289289
# issue #73
290290

291-
P = CFTime.Period{Float64, Val{86400}(), Val{0}()}
291+
P = CFTime.Period{Float64, Val{86400}(), Val{0}()}
292292
DT = DateTime360Day{P, Val{(2001, 1, 1)}()}
293293
start = DT(P(0.0))
294-
stop = DT(P(86400.0 * 23))
294+
stop = DT(P(86400.0 * 23))
295295
step_ = P(86400.0)
296296
r = start:step_:stop
297297
@test length(r) === Int(24)

0 commit comments

Comments
 (0)