Skip to content

Commit

Permalink
added docstrings for date exports
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdofu committed Jul 17, 2020
1 parent 8a0e0c8 commit 2b7daa0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions stdlib/Dates/src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,32 @@ abstract type AbstractTime end
`Period` types represent discrete, human representations of time.
"""
abstract type Period <: AbstractTime end

"""
Year
Quarter
Month
Week
Day
Intervals of time greater than or equal to a day.
Conventional comparisons between `DatePeriod`s are not all valid.
(eg `Week(1) == Day(7)`, but `Year(1) != Day(365)`)
"""
abstract type DatePeriod <: Period end

"""
Hour
Minute
Second
Millisecond
Microsecond
Nanosecond
Intervals of time less than a day.
Conversions between all `TimePeriod`s are permissible.
(eg `Hour(1) == Minute(60) == Second(3600)`)
"""
abstract type TimePeriod <: Period end

for T in (:Year, :Quarter, :Month, :Week, :Day)
Expand Down

0 comments on commit 2b7daa0

Please sign in to comment.