Closed GordStephen closed 8 years ago
I presume that the Dates package in Base has an abstract TimeType that parents Date and DateTime.
@quinnj ?
Yep, correct.
julia> subtypes(Dates.TimeType)
2-element Array{Any,1}:
Base.Dates.Date
Base.Dates.DateTime
Interesting. Starting to think about your interface above. It looks elegant and presumably solves the issue about supporting both Date and DateTime operations, no?
Yeah, exactly. It would also theoretically support any new or custom TimeTypes that were to come along in the future.
Good point, like a Ticktime
type maybe for high frequency trading
Added in #223
Thinking about how to approach the remaining issues in #190, it occurs to me that it would be useful to be able to define methods specific to Date- vs DateTime-indexed arrays. One approach might be to specify the TimeType as a TimeArray type parameter. The type definition might look something like:
One could then write things like:
Any thoughts?