Functions in Dates are exported

This commit is contained in:
Chris de Graaf 2018-10-15 11:55:09 -05:00
parent e47672bff1
commit b55dc64ff1
4 changed files with 7 additions and 7 deletions

View File

@ -210,7 +210,7 @@ function gen_license(pkg_dir::AbstractString, t::Template)
return String[]
end
text = "Copyright (c) $(Dates.year(Dates.now())) $(t.authors)\n"
text = "Copyright (c) $(year(today())) $(t.authors)\n"
text *= read_license(t.license)
gen_file(joinpath(pkg_dir, "LICENSE"), text)

View File

@ -51,7 +51,7 @@ Generic plugins are plugins that add any number of patterns to the generated pac
"https://myplugin.com/{{USER}}/{{PKGNAME}}.jl",
),
],
Dict{String, Any}("YEAR" => Dates.year(Dates.today())),
Dict{String, Any}("YEAR" => year(today())),
)
end
end
@ -61,9 +61,9 @@ interactive(::Type{MyPlugin}) = interactive(MyPlugin; file="my-plugin.toml")
The above plugin ignores files ending with `.mgp`, copies `defaults/my-plugin.toml` by
default, and creates a badge that links to the project on its own site, using the default
substitutions with one addition: `{{YEAR}} => Dates.year(Dates.today())`. Since the default
config template file doesn't follow the generic naming convention, we added another
`interactive` method to correct the assumed filename.
substitutions with one addition: `{{YEAR}} => year(today())`. Since the default config
template file doesn't follow the generic naming convention, we added another `interactive`
method to correct the assumed filename.
"""
abstract type GenericPlugin <: Plugin end

View File

@ -106,7 +106,7 @@ function Base.show(io::IO, t::Template)
if isempty(t.license)
println(io, "None")
else
println(io, "$(t.license) ($(t.authors) $(Dates.year(Dates.now())))")
println(io, "$(t.license) ($(t.authors) $(year(today())))")
end
println(io, "$spc→ Package directory: $(replace(maybe(t.dir), homedir() => "~"))")

View File

@ -114,7 +114,7 @@ end
Template:
User: $me
Host: github.com
License: MIT ($(LibGit2.getconfig("user.name", "")) $(Dates.year(now())))
License: MIT ($(LibGit2.getconfig("user.name", "")) $(year(today())))
Package directory: $pkg_dir
Minimum Julia version: v$(PkgTemplates.version_floor())
SSH remote: No