diff --git a/stdlib/Dates/src/query.jl b/stdlib/Dates/src/query.jl index cbad78689e62c..3004f7bb88c7d 100644 --- a/stdlib/Dates/src/query.jl +++ b/stdlib/Dates/src/query.jl @@ -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]