Skip to content

Commit

Permalink
Merge pull request #36703 from mrdofu/dates-docstrings
Browse files Browse the repository at this point in the history
added docstrings for date exports
  • Loading branch information
quinnj committed Feb 7, 2021
2 parents 49d802b + 64d3a2b commit 5ab3ed6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions stdlib/Dates/src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,34 @@ abstract type AbstractTime end
`Period` types represent discrete, human representations of time.
"""
abstract type Period <: AbstractTime end

"""
DatePeriod
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

"""
TimePeriod
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 5ab3ed6

Please sign in to comment.