Skip to content

Commit

Permalink
Merge pull request #25227 from invenia/rf/abstractdatetime
Browse files Browse the repository at this point in the history
Introduce an `AbstractDateTime` type
  • Loading branch information
quinnj authored Dec 30, 2017
2 parents 224b40f + e47f22a commit 17ba03a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stdlib/Dates/src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ machine instant. `Time`, `DateTime` and `Date` are subtypes of `TimeType`.
"""
abstract type TimeType <: AbstractTime end

abstract type AbstractDateTime <: TimeType end

"""
DateTime
`DateTime` wraps a `UTInstant{Millisecond}` and interprets it according to the proleptic
Gregorian calendar.
"""
struct DateTime <: TimeType
struct DateTime <: AbstractDateTime
instant::UTInstant{Millisecond}
DateTime(instant::UTInstant{Millisecond}) = new(instant)
end
Expand Down

0 comments on commit 17ba03a

Please sign in to comment.