Skip to content

Instantly share code, notes, and snippets.

@milktrader
Created March 17, 2013 16:36
Show Gist options
  • Save milktrader/5182328 to your computer and use it in GitHub Desktop.
Save milktrader/5182328 to your computer and use it in GitHub Desktop.
Trying to get an Array{TimeStamp} to show nice
show(io::IO, ts::TimeStamp) = println(ts.timestamp, " ", ts.value)
julia> var[1]
1971-12-31 102.09
julia> var[1:2]
2-element TimeStamp Array:
1971-12-31 102.09
1971-12-30 101.78
1971-12-31 102.09
1971-12-31 102.09
1971-12-30 101.78
1971-12-30 101.78
## I'm not sure why a TimeStamp Array shows like this or how to only show the first two lines in this example
@milktrader
Copy link
Author

The mistake is not passing io to println

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment