using Dates
julia> format = Dates.DateFormat("d U")
dateformat"d U"
julia> parse(Date,"28 February",format) + Dates.Year(2020-1)
2020-02-28
julia> parse(Date,"29 February",format) + Dates.Year(2020-1)
ERROR: ArgumentError: Day: 29 out of range (1:28)
Stacktrace:
[1] Date(::Int64, ::Int64, ::Int64) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Dates/src/types.jl:223
[2] parse(::Type{Date}, ::String, ::DateFormat{Symbol("d U"),Tuple{Dates.DatePart{'d'},Dates.Delim{Char,1},Dates.DatePart{'U'}}}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Dates/src/parse.jl:285
[3] top-level scope at none:0
4 posts - 3 participants