Skip to content

Commit

Permalink
Refactor deprecated parametic syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Nov 23, 2017
1 parent 8264526 commit e06daf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ let
Dates.toms(b::Beat) = Dates.value(b) * 86400
Dates._units(b::Beat) = " beat" * (abs(Dates.value(b)) == 1 ? "" : "s")
Base.promote_rule(::Type{Dates.Day}, ::Type{Beat}) = Dates.Millisecond
Base.convert{T<:Dates.Millisecond}(::Type{T}, b::Beat) = T(Dates.toms(b))
Base.convert(::Type{Dates.Millisecond}, b::Beat) = Dates.Millisecond(Dates.toms(b))

@test Beat(1000) == Dates.Day(1)
@test Beat(1) < Dates.Day(1)
Expand Down

0 comments on commit e06daf0

Please sign in to comment.