Skip to content

Commit

Permalink
Dates: docstrings for month constants (JuliaLang#31218)
Browse files Browse the repository at this point in the history
  • Loading branch information
eulerkochy authored and Raphael Bacher committed Mar 19, 2019
1 parent 624d8c5 commit 669aad8
Showing 1 changed file with 298 additions and 3 deletions.
301 changes: 298 additions & 3 deletions stdlib/Dates/src/query.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,304 @@ function daysofweekinmonth(dt::TimeType)
end

### Months
const January, February, March, April, May, June = 1, 2, 3, 4, 5, 6
const July, August, September, October, November, December = 7, 8, 9, 10, 11, 12
const Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
"""
January
The first month of the year.
# Examples
```jldoctest
julia> January
1
```
"""
const January = 1

"""
Jan
Abbreviation for [`January`](@ref).
# Examples
```jldoctest
julia> Jan
1
```
"""
const Jan = 1

"""
February
The second month of the year.
# Examples
```jldoctest
julia> February
2
```
"""
const February = 2

"""
Feb
Abbreviation for [`February`](@ref).
# Examples
```jldoctest
julia> Feb
2
```
"""
const Feb = 2

"""
March
The third month of the year.
# Examples
```jldoctest
julia> March
3
```
"""
const March = 3

"""
Mar
Abbreviation for [`March`](@ref).
# Examples
```jldoctest
julia> Mar
3
```
"""
const Mar = 3

"""
April
The fourth month of the year.
# Examples
```jldoctest
julia> April
4
```
"""
const April = 4

"""
Apr
Abbreviation for [`April`](@ref).
# Examples
```jldoctest
julia> Apr
4
```
"""
const Apr = 4

"""
May
The fifth month of the year.
# Examples
```jldoctest
julia> May
5
```
"""
const May = 5

"""
June
The sixth month of the year.
# Examples
```jldoctest
julia> June
6
```
"""
const June = 6

"""
Jun
Abbreviation for [`June`](@ref).
# Examples
```jldoctest
julia> Jun
6
```
"""
const Jun = 6

"""
July
The seventh month of the year.
# Examples
```jldoctest
julia> July
7
```
"""
const July = 7

"""
Jul
Abbreviation for [`July`](@ref).
# Examples
```jldoctest
julia> Jul
7
```
"""
const Jul = 7

"""
August
The eighth month of the year.
# Examples
```jldoctest
julia> August
8
```
"""
const August = 8

"""
Aug
Abbreviation for [`August`](@ref).
# Examples
```jldoctest
julia> Aug
8
```
"""
const Aug = 8

"""
September
The ninth month of the year.
# Examples
```jldoctest
julia> September
9
```
"""
const September = 9

"""
Sep
Abbreviation for [`September`](@ref).
# Examples
```jldoctest
julia> Sep
9
```
"""
const Sep = 9

"""
October
The tenth month of the year.
# Examples
```jldoctest
julia> October
10
```
"""
const October = 10

"""
Oct
Abbreviation for [`October`](@ref).
# Examples
```jldoctest
julia> Oct
10
```
"""
const Oct = 10

"""
November
The eleventh month of the year.
# Examples
```jldoctest
julia> November
11
```
"""
const November = 11

"""
Nov
Abbreviation for [`November`](@ref).
# Examples
```jldoctest
julia> Nov
11
```
"""
const Nov = 11

"""
December
The last month of the year.
# Examples
```jldoctest
julia> December
12
```
"""
const December = 12

"""
Dec
Abbreviation for [`December`](@ref).
# Examples
```jldoctest
julia> Dec
12
```
"""
const Dec = 12

monthname(month::Integer, locale::DateLocale) = locale.months[month]
monthabbr(month::Integer, locale::DateLocale) = locale.months_abbr[month]
Expand Down

0 comments on commit 669aad8

Please sign in to comment.