From d136977fc468d401345ff697cb513575f2233996 Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Wed, 12 Oct 2016 13:25:19 -0400 Subject: [PATCH] fix date/datetime --- src/recipes.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index e9c29cee..6a5cc4c7 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -790,6 +790,5 @@ abline!(args...; kw...) = abline!(current(), args...; kw...) # ------------------------------------------------- # Dates -@recipe function f{T<:Union{Date,DateTime}}(::Type{T}, dt::T) - dt -> convert(Int,dt), dt -> string(convert(Date, dt)) -end +@recipe f(::Type{Date}, dt::Date) = (dt -> convert(Int,dt), dt -> string(convert(Date,dt))) +@recipe f(::Type{DateTime}, dt::DateTime) = (dt -> convert(Int,dt), dt -> string(convert(DateTime,dt)))