From 428fbb9cb95d2e2a561912d950230e1ef2ee8156 Mon Sep 17 00:00:00 2001 From: Maxim Grechkin Date: Fri, 19 Aug 2016 12:43:30 -0700 Subject: [PATCH] add DateTime recepie --- src/recipes.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/recipes.jl b/src/recipes.jl index 8c90e7cd..a7b5132d 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -969,3 +969,8 @@ abline!(args...; kw...) = abline!(current(), args...; kw...) map(dt->convert(Int,dt), dts) end +@recipe function f{T<:AbstractArray{DateTime}}(::Type{T}, dts::T) + date_formatter = dt -> string(convert(DateTime, dt)) + xformatter := date_formatter + map(dt->convert(Int,dt), dts) +end