Odd that this wouldn't get the right type automatically, but I've fixed this in Dates.jl. If you have already added the Dates.jl package, you can just do a Pkg.update() to get the changes.
-Jacob On Thu, Jul 24, 2014 at 6:45 PM, cnbiz850 <[email protected]> wrote: > I tested 2 ways of constructing date array. But I got two different types > of the arrays from the two ways. How can I make them the same? What is > the proper Date type? At least, I hope not to use the Any type. > > -------------------------- > julia> dats = [date(2014, 7, ii) for ii=1:4] > 4-element Array{Date{C<:Calendar},1}: > 2014-07-01 > 2014-07-02 > 2014-07-03 > 2014-07-04 > > -------------------------- > julia> dates > 4-element DataArray{UTF8String,1}: > "2010/1/4" > "2010/1/5" > "2010/1/6" > "2010/1/7" > > julia> [date(dates[i]) for i=1:length(dates)] > 4-element Array{Any,1}: > 2010-01-04 > 2010-01-05 > 2010-01-06 > 2010-01-07 > >
